[ANN] HOOT: Hacked Object Oriented Transcript

wouter wouter.abraham at scarlet.be
Tue Feb 28 09:27:32 EST 2006


On 28 Feb 2006, at 03:55, Dick Kriesel wrote:

-snip-

> A "rugged id" is a native long id stripped of any "of group id"  
> clauses and
> "of stack" clauses, intended for use within a single stack.
>
> A "rugged long id" is a native long id stripped of any "of group id"
> clauses, intended for use across multiple stacks.
>

Thank you for the definitions.


On 28 Feb 2006, at 11:21, Dick Kriesel wrote:

> On 2/28/06 2:06 AM, "Geoff Canyon" <gcanyon at inspiredlogic.com> wrote:
>
>> getProp uRuggedID
>>    get the long id of the target
>>    if word 1 of it is "card" then return word 1 to 3 of it
>>    if "card" is among the words of it then return (word 1 to 3 of it
>> && word -7 to -4 of it)
>>    return word 1 to 3 of it
>> end uRuggedID
>>
>> getProp uRuggedLongID
>>    get the long id of the target
>>    if word 1 of it is among the words of "card stack" then return it
>>    if "card" is among the words of it then return (word 1 to 3 of it
>> && word -7 to -1 of it)
>>    return (word 1 to 3 of it && word -3 to -1 of it)
>> end uRuggedLongID
>
> What about a control on a card in a substack?

this could do (partly):

getprop uRuggedID
   get the long id of the target
   -- if word 1 of it is "card" then return word 1 to 3 of it
   if word 1 of it is among the words of "card stack" then return it
   if "card" is among the words of it then
     put num of words in char 1 to offset("of card id",it) + 1 of it  
into tStart
     return (word 1 to 3 of it && word tStart to tStart + 3 of it)
   end if
   return word 1 to 3 of it ###
end uRuggedID

getprop uRuggedLongID
   get the long id of the target
   if word 1 of it is among the words of "card stack" then return it
   if "card" is among the words of it then
     put num of words in char 1 to offset("of card id",it) + 1 of it  
into tStart
     return (word 1 to 3 of it && word tStart to -1 of it)
   end if
   return (word 1 to 3 of it && word -3 to -1 of it) ### !!!
end uRuggedLongID

###:  I'm not sure about the necessity of the last return statements  
in the getprop handlers.
          (I leave them out)
!!!:     the last return statement of the uRuggedLongID still needs  
to be adapted if it must stay in,
but I cannot imagine on what kind of long id it would be applicable.  
So please jump in if you know.

Greetings,
Wouter



More information about the Use-livecode mailing list