Re: switching skins at runtime

2014-12-29 Thread Werner Lehmann
I think this is something you need to do in SkinBase.dispose. Werner On 26.12.2014 22:55, Tom Eugelink wrote: Hm, I've got it working, but I need to call a getChildren().clear() before I start creating nodes in a skin. If not, the control will retain the nodes an old skin has created. Also any

Re: switching skins at runtime

2014-12-29 Thread Werner Lehmann
That's what I meant: clear children, or undo whatever you are doing to them, in dispose(). At any rate I wouldn't know if that is correct. It is just how I assume this would work. On 29.12.2014 11:44, Tom Eugelink wrote: That works for unbinding listeners to skinnable and the reset code for

Re: switching skins at runtime

2014-12-29 Thread Tom Eugelink
Clearing the children in dispose does not work, the control than actually has no nodes what so ever, so that still is done when building the new skin. Tom On 29-12-2014 11:55, Werner Lehmann wrote: That's what I meant: clear children, or undo whatever you are doing to them, in dispose(). At

Re: switching skins at runtime

2014-12-26 Thread Tom Eugelink
Hm, I've got it working, but I need to call a getChildren().clear() before I start creating nodes in a skin. If not, the control will retain the nodes an old skin has created. Also any style classes that were assigned remain, but those can be reset easily. Never the less I feel that setSkin()

switching skins at runtime

2014-12-23 Thread Tom Eugelink
Is it allowed / supported to execute setSkin with a new skin on a control that is part of a scene? Tom

Re: switching skins at runtime

2014-12-23 Thread David Grieve
Yes, it is allowed. But know that there is some code in setSkin that prevents setting a skin that is either instance equal or the same class. On 12/23/14, 6:27 AM, Tom Eugelink wrote: Is it allowed / supported to execute setSkin with a new skin on a control that is part of a scene? Tom

Re: switching skins at runtime

2014-12-23 Thread Tom Eugelink
Then this NPE on getSkinnable() when switching Agenda's skin when the control is already shown (instead of when created) must be my doing some how. Thanks! Tom On 23-12-2014 14:36, David Grieve wrote: Yes, it is allowed. But know that there is some code in setSkin that prevents setting a