On Dec 23, 2010, at 9:59 AM, David Bovill wrote:
Peter, not shure if I got you right? Why not take:
word 1 to 3 of the long id of theObjectRef
Well, word 1 to 3 of theObjectRef gives:
field id 1072
since theObjectRef looks something like:
field id 1072 of group id 1052 of group id 1057 of group id 1004 of
card id 1009 of stack "PDdata" of stack "/Users/pmbrig/Documents/
Revolution stacks/ PtData-rev/ Psychopharmica.rev"
but I want to extract the short name of group id 1004, the last one
before the card. I could have parsed the long id by replacing " of "
with comma, finding the itemoffset of "card id" and subtracting 1, but
for whatever reason at the time* I chose a recursive function, and it
works fine.
-- Peter
Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig
* alas, I too often find myself saying, "It seemed like a good idea at
the time...." Story of my life, in scripting, at least.
_______________________________________________
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