wait 0 with messages (and the defaultStack)
Paul Dupuis
paul at researchware.com
Mon Aug 1 16:25:08 EDT 2022
Yea, a number of years ago, I went to always fully qualifying object
references through all the techniques you mentioned, but we've just not
had a chance to scrub the entire code base (100,000 lines+) and so this
one got missed until now.
We're now going through the entire code base to catch any last cases
where object references could be in error due to any wait with messages
statements (combined with user actions).
On 8/1/2022 4:16 PM, Bob Sneidar via use-livecode wrote:
> As my application(s) became more complex, I also ran into topstack and curentcard issues. As a result, I am in the habit now of either using "of me" appended to every command of in a card or stack script, or else sending the long id of an object to a command or function that is not in the message path.
>
> For instance, if I am processing all the fields on a card, I put the handler in the card script and then use the form 'field "myField" of me' to reference each field. Even better, if I reference the object repeatedly I will 'put the long id of <object reference> of me' into a variable initially, then use the variable as a reference.
>
> Bob S
>
>
>> On Aug 1, 2022, at 12:43 , Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> The Dictionary Entry (LC 9.6.8) does state "If the wait..with messages form is used, LiveCode continues normal processing during the wait. The current handler is frozen, but the user can start other handlers and perform other actions such as switching cards." and 'switching cards' does imply changing the context of relative object references even if the defaultStack does not change, so perhaps I should have realized, but didn't until just last week.
>
> _______________________________________________
> 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