Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadLayoutfromData() was removed - but is useful #1

Open
seclorum opened this issue Jun 19, 2012 · 2 comments
Open

loadLayoutfromData() was removed - but is useful #1

seclorum opened this issue Jun 19, 2012 · 2 comments

Comments

@seclorum
Copy link

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?

@derickd
Copy link
Owner

derickd commented Jun 19, 2012

I went back and checked previous versions (I have kept a list of all downloads at http://code.google.com/p/moaigui/downloads/list), and I can't seem to find the loadLayoutFromData function. Are you referring to the loadLayout function? That function should still be available. Is it possible this was a function you had added yourself, and then downloaded the new version and copied it over the version you had with this change?

@seclorum
Copy link
Author

I've submitted a patch for this method to be added to the main moaigui core codebase .. as it is very useful for having multiple GUI's to switch between in an app .. I will prepare a sample shortly and submit it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants