Scott-

Saturday, September 14, 2013, 7:23:35 PM, you wrote:

> Actually Mark, locking messages is often a good way to speed things
> exactly because the IDE doesn't track objects that are added or deleted
> until after the current handler has finished executing.

Well, you had me going for a while there, but no. If you lock messages
the IDE doesn't get the delete<object> message at all. This is what
lock messages is supposed to do. Try this:

in a frontscript put

on deletefield
  put "deleting" & cr after msg
  deletefield
  pass "deletefield"
end deletefield

Then create a new mainstack with a button and a field.
In the button script put

on mouseUp
  delete field 1
end mouseUp

OK - now that you can see the "deleting" message in the message box,
put a new field on the stack again and change the mouse script to

on mouseUp
  lock messages
  delete field 1
  unlock messages
end mouseUp

So yes, locking messages *is* a good way to speed things up in the
proper situations, e.g., if you're doing this in a standalone you'll
gain a significant boost, but there might be side effects if you try
this in the IDE.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to