Mysteries of Me

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 31 12:04:41 EDT 2018


A guess: "me" resolves correctly for controls only. Stacks and cards are 
not controls, so behaviors attached to those resolve to the behavior script 
itself. Since there are no cards in a behavior script, it fails. Maybe.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 31, 2018 10:39:53 AM Bob Sneidar via use-livecode 
<use-livecode at lists.runrev.com> wrote:

> It's not a bug, it's a limitation (probably the wrong word) of the parser. 
> As has been talked about in the past, messing with the parser is one of the 
> least desirable things the devs have to do, and from what I have gleaned, 
> they avoid it if at all possible. The parser is really where all the LC 
> magic is. Currently the spells are working quite nicely. You don't want to 
> mess with the magic. :-)
>
> Bob S
>
>
>> On Oct 30, 2018, at 10:56 , Sannyasin Brahmanathaswami via use-livecode 
>> <use-livecode at lists.runrev.com> wrote:
>>
>> Hmm, is that a bug?  Should we report it? I think so.
>>
>>
>>
>> On 10/30/18 5:54 AM, Bob Sneidar via use-livecode wrote:
>>> Ah yes I've encountered this. What I do is I have 2 functions: 
>>> getParentCard() and getParentStack(). pass the long id of any object on a 
>>> card and they return the long id of the card, or the long filename of the 
>>> stack respectively. Then you can use go tParentCard and that will compile. 
>>> Your issue is in fact, why I wrote these functions! They are very simple as 
>>> you can see:
>>>
>>> function getParentCard pObjectID
>>>   put offset("card id", pObjectID) into tStartChar
>>>   put char tStartChar to -1 of pObjectID into tCardID
>>>   return tCardID
>>> end getParentCard
>>>
>>> function getParentStack pObjectID
>>>   put offset("stack ", pObjectID) into tStartChar
>>>   put char tStartChar to -1 of pObjectID into tParentStack
>>>   return tParentStack
>>> end getParentStack
>>>
>>> Bob S
>>>
>>>
>>>> On Oct 29, 2018, at 17:15 , Sannyasin Brahmanathaswami via use-livecode 
>>>> <use-livecode at lists.runrev.com> wrote:
>>>>
>>>> @tom  go card and go to card same thing.
>>>>
>>>> @ bob
>>>>
>>>> That's what I understand (as you have described it)
>>>>
>>>> -- The behavior is set in the properties of a stack.
>>>> -- the SE suggestions "knows" this and on typing
>>>>     go card...[List of cards in current stack appears... choose one)
>>>>
>>>> # you get:
>>>>
>>>> go card "my-audio-library" of me  #as we would expect
>>>>
>>>> # but it gives an error; will not compile. You have to be explicit:
>>>>
>>>> go card "my-audio-library" of this stack
>>>>
>>>> # then it compiles
>>>>
>>>> -- re: backscript
>>>>
>>>> function isThisTrue() then
>>>>   go card "my-audio-library" of me  # as per SE suggestions
>>>>  # generates an error
>>>> end isThisTrue
>>>>
>>>> # isThisTrue , is part of a back script. It won't compile
>>>> # I wondered it that was causing a reference change
>>>> # because this works
>>>>
>>>> function isThisTrue() then
>>>>   go card "my-audio-library" of this stack
>>>> end isThisTrue
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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