problem positioning a sub stack using globalLoc

Chris Sheffield csheffield at readnaturally.com
Tue Aug 26 10:53:01 EDT 2003


I have a sub stack that I want to open when a user clicks on a list of
words.  I'm trying to position the sub stack right over the top of this list
of words, which are in a group called "Key Words".  Obviously I can't use
the location of that group, since it's relative to the main stack and not to
the screen.  So I thought I'd try the globalLoc function, which seems to
return the correct value when used in the Message Box, but not when I use it
in a script.  I copied and pasted this line of code

put the globalLoc of (the loc of grp "Key Words" of cd "Prediction" of stack
"RNStories")

directly from my script into the message box, and the returned values are
not consistent.

Is there a better way to do this?  How can I set the loc of a sub stack so
that it covers an object in my main stack?

Thanks,

Chris Sheffield
Software Development
Read Naturally
csheffield at readnaturally.com







More information about the use-livecode mailing list