I typically move, then destroy native objects when I change scenes.
You cannot treat native objects like display objects in all cases.
Corona bends over backwards to make them behave similarly, but you must remember they are owned by the OS, not Corona so the OS gets the final word on placement, sizing, fonts, etc.
Native objects are not true children of the sceneGroup.
If the sceneGroup is moved or destroyed, it will attempt to move/destroy the native object, but I suspect that composer scene changes are more subtle than this, thus the oddness you are encountering.
What I would like to do eventually with this is have a button that creates a newTextField (for categories of garbage) and another textField for its amount and a green button to add a new subcategory.
I don’t know. I guess so. It is up to you how to manage the references to your text fields. :unsure:
PS - I forgot to mention this, but I don’t think you need to use composer at all for this. You could simply create a set of display groups, and when you click a button:
hide all the groups
show just the group associated with that button.
This will solve all your text field is visible at the wrong time problems.
I don’t want to discourage you from using and learning composer.* but this is not how I would use it and I think it adds a level of complexity that is unnecessary for the application you are writing.
I typically move, then destroy native objects when I change scenes.
You cannot treat native objects like display objects in all cases.
Corona bends over backwards to make them behave similarly, but you must remember they are owned by the OS, not Corona so the OS gets the final word on placement, sizing, fonts, etc.
Native objects are not true children of the sceneGroup.
If the sceneGroup is moved or destroyed, it will attempt to move/destroy the native object, but I suspect that composer scene changes are more subtle than this, thus the oddness you are encountering.
What I would like to do eventually with this is have a button that creates a newTextField (for categories of garbage) and another textField for its amount and a green button to add a new subcategory.
I don’t know. I guess so. It is up to you how to manage the references to your text fields. :unsure:
PS - I forgot to mention this, but I don’t think you need to use composer at all for this. You could simply create a set of display groups, and when you click a button:
hide all the groups
show just the group associated with that button.
This will solve all your text field is visible at the wrong time problems.
I don’t want to discourage you from using and learning composer.* but this is not how I would use it and I think it adds a level of complexity that is unnecessary for the application you are writing.