getProp puzzle

Mike Bonner bonnmike at gmail.com
Sun Sep 11 18:03:13 EDT 2016


Hmm. Ok. My mistake.  Seems to work.. is stack B a substack of stack A?  If
not, that might be the issue.. If stack b is a mainstack, then the request
can't go up the message path to stack a, which then makes my previous point
applicable.

On Sun, Sep 11, 2016 at 3:59 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> The "of stack b" part, delineates where the pseudo property resides. Since
> there is no getprop nSL of stack b, you get nothing back.  Better off to
> create a function that takes an object reference as a parameter, and make
> sure its in the message path so you can hit it from anywhere.
>
> On Sun, Sep 11, 2016 at 3:46 PM, David Epstein <dfepstein at comcast.net>
> wrote:
>
>> The script of stack “A” has a getProp handler to report the number of
>> lines in an object’s script:
>>
>> getProp nSL
>>   return the number of lines in the script of the target
>> end nSL
>>
>> With stack A frontmost, I type in the message box “the nSL of this stack”
>> or “the nSL of stack’A’”, and I get the expected result.  But with stack A
>> still frontmost, if I type in the message box “the nSL of stack ‘B’” I get
>> an empty result (not even a “0”).
>>
>> What am I missing?
>>
>> Thanks very much.
>>
>> David Epstein
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>



More information about the use-livecode mailing list