[Laszlo-user] Adding event handlers to color picker
henry.minsky at gmail.com
Tue Oct 9 14:59:32 PDT 2007
You could manually register an event listener in script using the
LzDelegate class, one way to call it's constructor takes four args, an
object and methodname to call, and an object and event name to listen
new LzDelegate(myobject, mymethodname, colorpickerobject, "oncolorselect")
or whatever the event name is.
On 10/9/07, Rich Christiansen <warproof at warproof.com> wrote:
> When you mention that this is "one way" to do it, it makes me wonder what
> the other ways would be. Could you elaborate a bit?
> Henry Minsky wrote:
> If you make the color picker send an event, you can register some other
> guy to trigger on it, one way would be to use the "reference" attribute
> on the handler in your other component:
> <colorpicker id="mycolorpicker"/>
> <handler name="onnewcolor" reference="mycolorpicker"/>
> Then make sure that colorpicker sends a "onnewcolor" event
> when you change something.
> On 10/9/07, Mike Pence <mike.pence at gmail.com> wrote:
> So, I fortunately found Henry's color picker
> and I want to have another component (so nice to be talking in
> components -- freakin' Rails!) notified when the color selection has
> What is the recommended approach for this?
> Mike Pence
hminsky at laszlosystems.com
More information about the Laszlo-user