Blast message to multiple objects..
Alex Tweedly
alex at tweedly.org
Thu May 19 19:30:06 EDT 2016
Rather than have "all controls matching a mask ..." get the message, I
think it would be better to introduce a publish-subscribe model.
One example (not one you can use directly :-) is in the IDE, see the
publish/subscribe section of
https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/
but those ideas could easily be borrowed for your own purpose (or, maybe
less easily, made into a general-purpose library for all to use).
-- Alex
On 19/05/2016 23:38, Mike Bonner wrote:
> I don't suppose its possible to dispatch or send a message to a group of
> objects all at once is there? (for example lets call a bunch of buttons
> named *cough* sprite##)
>
> Its not that difficult to write a loop to dispatch to each, but it would be
> very interesting if one could release a message into the wild, and all
> controls matching a mask would sit up and take notice.
>
> It would be nice to be able to pop out an "reintialize" message, and any
> controls with that particular handler would.. well.. reinitialize.
>
> Just curious.
> _______________________________________________
> 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