Extracting a reference to a stack

David Bovill david at viral.academy
Sat Aug 8 19:20:16 EDT 2015


Wow - lot's of cool examples. Richards is one of the shortest - but breaks
theoretically if a stack is named weirdly. Thierry gets the nerdy award,
and mark for digging up the new offset feature (which I think is the
feature I remember).

By the way one of the most puzzling aspects of software conventions is to
publish your documentation as pdf's - presumably so you can print the
things. Can we not have the Livecode release notes published as searchable
HTML - or has someone rescued this valuable archive from this historical
lunacy already? As in do I really have to manually read through all these
pdf's to find this feature documented, or perhaps import them to Evernote,
or....

Back to the mission of perfecting the stack_Object of a control - I seem to
remember it had something to do with tokens or a newer equivalent -
combining that with Marks remembrance we have:

   put the long name of control "this is a stack of rubbish" into
> someControl
>    set the wholematches to true
>    put word (wordOffset ("stack", someControl)) to -1 of someControl
>

the new feature is tokenoffset - but it does not seem to work. wordofffset
will do the job as it ignores anything that is quoted (this surprised me).


On 8 August 2015 at 23:51, Richard Gaskin <ambassador at fourthworld.com>
wrote:

> dunbarx wrote:
>
> Wait just a doggone minute. The long id of a control contains the stack
>> reference.
>>
>
> Yep - and being a lazy person this is how I get the stack reference:
>
> function ObjectStack pObj
>    return char (offset(" of stack ", pObj)+4) to -1 of pObj
> end ObjectStack
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  ____________________________________________________________________
>  Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list