Re: Script Only Stack Behaviors and Nesting

2018-07-05 Thread Bob Sneidar via use-livecode
Not misquoted, but misunderstood. > On Jul 2, 2018, at 12:33 , J. Landman Gay via use-livecode > wrote: > > Actually, do you mean you want to set the script locals for the behavior > object itself? You can do that, but it will only apply to that particular > control. The magic word is "this

Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread J. Landman Gay via use-livecode
On 7/3/18 5:48 PM, Monte Goulding via use-livecode wrote: On 4 Jul 2018, at 12:52 am, Bob Sneidar via use-livecode wrote: Jacque says you can reference a behavior's script locals ie. the sLocal of THIS ME Well you can’t actually do that so maybe Jacque is being misquoted? I think I mis

Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread Sannyasin Brahmanathaswami via use-livecode
Just a side note, that for "parent" behaviors which have been "nested" as the behavior of multiple "children" ... we are "blinded sided" to this, as the designation is in the first comment of the script with doesn't appear in the IDE, SE The only other place to see it is in the PB in 9+, that i

Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread Monte Goulding via use-livecode
> On 4 Jul 2018, at 12:52 am, Bob Sneidar via use-livecode > wrote: > > Jacque says you can reference a behavior's script locals ie. the sLocal of > THIS ME Well you can’t actually do that so maybe Jacque is being misquoted? Cheers Monte ___ use-

Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread Brian Milby via use-livecode
Can’t we already do that with a custom getprop/setprop? On Jul 3, 2018, 10:53 AM -0400, Bob Sneidar via use-livecode , wrote: > Not if you had to reference them the way Jacque says you can reference a > behavior's script locals ie. the sLocal of THIS ME. I have a lot of objects > (my SearchBar i

Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread Bob Sneidar via use-livecode
Not if you had to reference them the way Jacque says you can reference a behavior's script locals ie. the sLocal of THIS ME. I have a lot of objects (my SearchBar is a good example) where I store information in scrip locals (the old dgData and hilited record of a datagrid before performing a hot

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Mike Bonner via use-livecode
Curious if this would be useful. It occurred to me that one could use getters and setters in the behavior if one wanted a "central" location for data for objects using that behavior. Not as easy as just using an actual property set, but might end up being faster? To test I put the following into

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Mark Wieder via use-livecode
On 07/02/2018 04:16 PM, Bob Sneidar via use-livecode wrote: oic. Well getting the stacks custom property and referencing that is working for me. It's curious then if you can use the sLocal of this me, could you also use the sLocal of button x or stack y?? That would be very cool! That would me

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Monte Goulding via use-livecode
> On 3 Jul 2018, at 9:16 am, Bob Sneidar via use-livecode > wrote: > > That would be very cool! That would mean you could get and set the script > locals of another object. No it really wouldn’t. It would make them worse than globals… eek. Cheers Monte

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Bob Sneidar via use-livecode
oic. Well getting the stacks custom property and referencing that is working for me. It's curious then if you can use the sLocal of this me, could you also use the sLocal of button x or stack y?? That would be very cool! That would mean you could get and set the script locals of another object.

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Bob Sneidar via use-livecode
Yes, but I am not talking about the child object's script. That works fine. What doesn't work are script locals in the behavior itself. Bob S > On Jul 2, 2018, at 12:17 , J. Landman Gay via use-livecode > wrote: > > They do retain independent values, one set of script locals for each > ins

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread J. Landman Gay via use-livecode
Actually, do you mean you want to set the script locals for the behavior object itself? You can do that, but it will only apply to that particular control. The magic word is "this me" : "set the sLocal of this me to xxx". If you want the script locals of the behavior object to be shared for e

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread J. Landman Gay via use-livecode
They do retain independent values, one set of script locals for each instance. For example, if you have two buttons that use the same behavior, button 1 will retain its script local values and button 2 will retain its own (different) set of values. On 7/2/18 1:42 PM, Bob Sneidar via use-liveco

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Bob Sneidar via use-livecode
Okay, so apparently I cannot use script local variables in a behavior. Setting the variables in a handler in a behavior script does not retain the values when that handler exits, like they do in a normal object script. Should they? The workaround for me is to simply get the custom property of e

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Bob Sneidar via use-livecode
Whoops! Wrong thread. Bob S > On Jul 2, 2018, at 10:05 , Bob Sneidar via use-livecode > wrote: > > Hi all. I nailed this down, and it is indeed as someone surmised, that even > though the script editor variable watcher indicated that script local > variables had the correct values, it was

Re: Script Only Stack Behaviors and Nesting

2018-07-02 Thread Bob Sneidar via use-livecode
Hi all. I nailed this down, and it is indeed as someone surmised, that even though the script editor variable watcher indicated that script local variables had the correct values, it was showing me the BEHAVIOR's script local variable values, and NOT those for the STACK, which were in fact still

Script Only Stack Behaviors and Nesting

2018-06-27 Thread Bob Sneidar via use-livecode
Hi all. I'm getting heavily into behaviors and script only stacks now (in preparation for Levure Framework) because my project has become complex enough to make it almost inevitable. I have perhaps 20 or so substacks in a mainstack. All the substacks have quite a bit of shared behavior, so I c