Events broadcast by default.  Here is a small example:

<canvas debug="true">
   <button text="Push Me" id="mybutton" onclick="myevent.sendEvent 
(new Date)">
     <event name="myevent" />
   </button>

   <view name="view_one">
     <handler name="myevent" reference="mybutton" args="date">
       Debug.format("%w got event %s\n", this, date);
     </handler>
   </view>

   <view name="view_two">
    <handler name="myevent" reference="mybutton" args="date">
       Debug.format("%w got event %s\n", this, date);
     </handler>
   </view>
</canvas>

On 2006-05-26, at 04:43 EDT, Edmond Lee wrote:

> Hi all:
> Use openlaszlo UI components, If App receive a message and must  
> notify more
> than one component to do something, how can I do? Other way I want  
> many
> components  register the action message listener, if the message  
> received
> all components register the action message listener do action;
>
> May be this method named broadcast event to all components they  
> want;but the
> component must register it;
>
> Thks
> Best regards!!
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev@openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to