SolutionModel - Extend Form Issue?

I’m sure this is just a case of “stupid user detected” (ME!) - but I’m having an issue that’s really confounding me.

I have “formA” with 2 named labels on it.

I am using the solutionModel to create a new form (“formB”) that extends formA.

So far, so good.

However, I need to access the labels on the the new form (“formB”) to update some properties (rollOverCursor and one of the methods attached to one of the labels). However, when I try to get a list of all the labels on “formB” - it comes up empty.

This is confusing, because I can go ahead and reference the named objects on “formB” at runtime (formsB.elements.myLabel.text) - just not their design properties.

Is there a way to do this - or do I have to create the complete form “by hand”?

OK - disregard. The basic answer is: no, you can’t do that.

If you want to alter properties - you have to do it on the base form, which would change the newly instantiated forms as well.

Bottom line is: if you use SolutionModel to create “extended” forms - you can only alter things you add to THAT INSTANCE.

Many thanks to Johan who answered me offline…

bobcusick:
Many thanks to Johan who answered me offline…

Offline? i wasnt offline! :)

We do have idea’s to fix this problem, that you can alter properties on the subform of the baseform that only will happen on that subform instance.
But i am afraid that wont make it into Tano.

bobcusick:
ottom line is: if you use SolutionModel to create “extended” forms - you can only alter things you add to THAT INSTANCE.

Not a fix and it’s a little extra work but you can deconstruct a form into data and use that to build your new form (along with any modifications). Troy posted some de- and re-construct code here:

http://forum.servoy.com/viewtopic.php?f=21&t=11272#p57829

Not up-to-date with the latest SolutionModel but it’s a good starting point.