Terrible RunRev Bug? - Was Weirdness Passing Messages

Mark Waddingham 36degrees at runrev.com
Mon Mar 27 08:03:23 EST 2006


> I have a problem that first I thought was something that I was  
> doing wrong but now I'm not sure and would like confirmation of how  
> the Context mechanism works in RunRev.
>
> I have the following setup:
> 1  StackMain:Card1:ObjectA:mouseUp   - Calls Function  
> StackUtil:PutMessage("MessageX")
> 2  StackUtil:PutMessage                             - Calls Handler  
> StackMain:Card2:ObjectX:MessageX (via send)
> 3  StackMain:Card2:ObjectX:MessageX - Put "MessageX" into me and  
> then Calls Function StackUtil:PutMessage("MessageY")
> 4  StackUtil:PutMessage                            - Calls Handler  
> StackMain:Card2:ObjectY:MessageY (via send)
> 5  StackMain:Card2:ObjectY:MessageY - Put "MessageY" into me
>
> In this case the "put" statement at step 5 does NOT put "MessageY"  
> into  StackMain:Card2:ObjectY (the object is unchanged), but the  
> "put" at step 3 works ok.
>
> If I change the code at Step 5 to read:
> put "MessageY" into field "FieldY" of group "Y" of card 2 of stack  
> "/Documents/Test/StackMain.rev" (e.g. the hard coded name of the  
> object).
>

Try ensuring that the 'sharedText' property of your target fields are  
set to true.

If the sharedText is false, the field stores and retrieves its data  
from a card-local store, rather than its private store. Since  
'sending' a message only changes the default stack and not the  
current card of that stack, the active card store will be the card  
you aren't expecting.

Warmest Regards,

Mark.

------------------------------------------------------------------
  Mark Waddingham ~ 36degrees at runrev.com ~ http://www.runrev.com
        Runtime Revolution ~ User-Centric Development Tools






More information about the Use-livecode mailing list