When does a Stack Actually Die in the IDE???

Jim Ault JimAultWins at yahoo.com
Fri Apr 14 11:50:20 EDT 2006


Does this work for you?

  set the itemDel to "/"
  get char 1 to -2 of item -1 of the long name of this stack

answer it

Jim Ault
Las Vegas



On 4/14/06 8:08 AM, "Richard Gaskin" <ambassador at fourthworld.com> wrote:

> David Burgun wrote:
>> The problem is that I only have the long id of an object, to get the
>> stack name from this I have to parse the long id as a string, which I
>> can do, but it's slow.
> 
> Sounds like an opportunity for the gang here to come up with a fast way
> to parse the stack name.
> 
> Here's a starting point, which clocks in at 0.1349ms on a 1GHz G4:
> 
> function ObjStack pObj
>    put the long id of pObj into tObj
>    get offset(" of stack "&quote, tObj)
>    delete char 1 to (it+10) of tObj
>    get offset(quote,tObj)
>    return char 1 to (it-1) of tObj
> end ObjStack
> 
> 
> --
>   Richard Gaskin
>   Managing Editor, revJournal
>   _______________________________________________________
>   Rev tips, tutorials and more: http://www.revJournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list