-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GuiControl clone is partially broken #211
Comments
I'm surprised that any of the static fields specific to GuiControl are being copied - there is no copyTo method for GuiControl or any other Gui class. Only the fields that get inherited from SimObject have this implemented. I haven't tried a fix yet, but as a starting point I would look at how the copyTo methods are built for scene objects and assets and write a similar function that would apply to GuiControl. |
The advantage of this would be to use .taml Gui profiles as templates, from which you could easily instance copies of. |
Small update: I have a local branch where the profile field is successfully cloned. Next step is to implement copying for the rest of the fields. This is actually a massive amount of work - in addition to reformatting I'm also going back and adding missing script methods as well (hello getProfile). Writing out to Taml is still completely broken. |
I wouldn't list this as a priority, just a "would be nice to have" feature. Maybe documenting the work required would help someone who wants to get their hands dirty. |
When using Guicontrol.clone(), some information from the original Guicontrol is copied over to the new object while other elements are not.
Elements not being copied to the clone :
This occurs regardless of the boolean argument passed to the function, which is supposed to determine if dynamic fields are copied to the new object.
The text was updated successfully, but these errors were encountered: