Instantiaing Grouped Controls - Templates - Responsive

Alex Tweedly alex at tweedly.net
Fri Jun 9 10:36:06 EDT 2017



On 09/06/2017 00:40, Richard Gaskin via use-livecode wrote:
>
> I don't understand.  A script-only stack contain no objects, so even 
> if you later copy them, they still need to be dynamically instantiated 
> at some point, no?
>
> Like a Zen koan: how can there be a binary object where there is no 
> binary object?
>
Hmmm - we're probably heading off into the weeds here ....

The script-only stack is used as a behaviour for controls within another 
stack - so it can copt hose controls without them bieng binary objects 
within the scrip-only stack.

OR

The script-only stack creates a set of objects the first time it is used 
(creating the template group).
Subsequent uses of the script (in the same context) will (at most) copy 
that template group - so yes they are being created - but with minimal 
work because it's doing a copy rather than  "create and then set lots of 
properties".

So not quite as much saving in the second case - but still less work 
than creating and setting lots of properties for the controls.

Alex.




More information about the use-livecode mailing list