word 8 of the long id is not reckless, it's just not going to work every time, because of substacks, and such. for example this is a valid long id for a stack: stack "/Drive/Folder/Stack. rev" and this too, if it's an unsaved substack: stack "Untitled 2" of stack "Untitled 1"
There's also "the owner" which does what you want... as long as you never use any groups :) Incidentally, can't you set the stack to a parameter in the button? that's what i'd do: on mouseUp put the name of this stack into myCurrentStack doThing myCurrentStack end mouseUp On 24.07.2012, at 17:33, Dr. Hawkins wrote: > I have a handler that needs to handle an event differently depending > upon which substack the button calling it is on. > > I don't see a direct way of referencing the calling stack. > > There is the topStack() function, which would *seem* to necessarily > return the relevant stack, but something makes me nervous about that. > > And then there is choosing word 8 of the long name of the object, but > that seems downright reckless . . . > > Is tehre a "clean" way to do this? > > -- > The Hawkins Law Firm > Richard E. Hawkins, Esq. > (702) 508-8462 > hawkinslawf...@gmail.com > 3025 S. Maryland Parkway > Suite A > Las Vegas, NV 89109 > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- Use an alternative Dictionary viewer: http://bjoernke.com/bvgdocu/ Chat with other RunRev developers: http://bjoernke.com/chatrev/ _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode