[ANN] HOOT: Hacked Object Oriented Transcript
Dick Kriesel
dick.kriesel at mail.com
Mon Feb 27 21:37:35 EST 2006
On 2/27/06 6:02 PM, "wouter" <wouter.abraham at scarlet.be> wrote:
> Rugged id's are a good idea but this handler will not do the trick.
> And it is difficult to deduce from this handler from where to where
> or which parts of the long id is what you call the rugged id.
Thanks for catching my error, Wouter. I forgot what the offset function
returns, and I typed that handler in without testing it.
After testing, it looks like this:
getProp uRuggedID
put the long id of the target into tLongID
if word 1 of tLongID is not "stack" then
-- note: stacks do not have rugged ids
put word 1 to 3 of tLongID into tRuggedID
put offset(" of card id ",tLongID) into tOffset
if tOffset > 0 then
put char tOffset to tOffset + offset(space,tLongID,tOffset + 12) \
+ 11 of tLongID after tRuggedID
-- note: 12 is the length of " of card id "
end if
end if
return tRuggedID
end uRuggedID
A "rugged" id is a native long id stripped of any "of group id" clause.
-- Dick
More information about the use-livecode
mailing list