Mysteries of Me
Bob Sneidar
bobsneidar at iotecdigital.com
Tue Oct 30 11:54:41 EDT 2018
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
More information about the use-livecode
mailing list