Skip to content

loadLayoutfromData() was removed - but is useful #1

Description

@seclorum

Hi Derick - I have been using loadLayoufromData() in the moaigui API, to be able to things like this:

app_screens = { 
  { data = dofile(resources.getPath("layout_welcome.lua")),         layername="welcome_" },
  { data = dofile(resources.getPath("layout_genderselect.lua")),    layername="genderselect_" },
  { data = dofile(resources.getPath("layout_weightselect.lua")),    layername="weightselect_" },
  { data = dofile(resources.getPath("layout_heightselect.lua")),    layername="heightselect_" },
  { data = dofile(resources.getPath("layout_birthday.lua")),        layername="birthday_" },
  { data = dofile(resources.getPath("layout_summary.lua")),         layername="summary_" },
}

--- then, later on:

        roots, widgets, groups = g:loadLayoutfromData(app_screens[screen_requested].data, app_screens[screen_requested].layername)

.. and actually, this has worked very well for multi-form layouts. I was just wondering what the reason for removing this from the API was, and if there is an alternative method that you'd like us to be using?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions