Behaviors not honoring script local variables??
bobsneidar at iotecdigital.com
Wed Jun 27 19:08:19 EDT 2018
Not only that, I think I overthought this. All I really need to do is retrieve the array and then use the array elements instead of the variables. It all started when I began using behaviors and discovered that a behavior does not have access to a scripts own constants. This was a way for me to use script locals in both the behavior and the parent script by having the getStackConstants() function in each one. I'd have to replace every instance of a script local with an array reference, but it's probably better in the long run.
> On Jun 27, 2018, at 15:53 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> You know you are right. I just noticed that. That syntax of mine should not have even worked LOL! Talk about a forgiving interpreter!
> Bob S
>> On Jun 26, 2018, at 23:25 , Dick Kriesel via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> On Jun 26, 2018, at 1:13 PM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> do "put " & quote & aStackConstants [tConstant] & quote & " into " & tConstant
>> Hi, Bob. If you wanted simpler code, that could be just
>> do "put aStackConstants[ tConstant ] into " & tConstant
>> — Dick
More information about the Use-livecode