P T,

Thanks for responding. Now that mention it I do remember reading that adding an event handler didn't supplant the super's handler. I also had looked at the page you mentioned but had not paid too much attention to it because it said this was a suggested change to the language and I am just getting started up the learning curve.

But the behavior I am seeing doesn't mesh with what you are saying. Not sure if this is my limited understanding or some kind of bug. Following is a simple application. When I click in the field the text in the field is selected. If the "onmousedown" handler is commented out then the insertion point is set which is what I would expect.

<?xml version="1.0" encoding="UTF-8" ?>
<canvas>

<inputtext name="theField" text="This is the text for the field.">

<method event="onmousedown">
</method>

</inputtext>
</canvas>

Again any feeback is appreciated,
Daniel..

P T Withington wrote:

[cc-ing the doc guy]

This page may be informative.

http://wiki.openlaszlo.org/Event_and_handler_tags

It is implemented in dev.

Specifically to your question, you don't have to call the superclass's handler, because handlers don't get overridden, they 'accumulate' and all will be called. If you want to override the behavior of a handler, you need to handle with a named method and override that method instead.

I'm cc-ing the doc guy, because I think this is a common confusion about events that I hope the new event and handler tags will make less confusing. We need to make sure we explicate that in the doc for them...

On 11 Jan 2006, at 16:33, Daniel Pool wrote:

I am looking at event handling and I can't figure something out. I was trying to dig through the source for LFC to understand it but had troubles accessing files via subversion and now the repository is being upgraded so I can't look there at the moment.

What I want is to be able to have a handler for an object and have that handler call the superclasses event handler for the same event. Specifically I want to know when a field (which is derived from LzInputText) receives a mouse-click. But I still want the field to do whatever it was going to do with the click. Or maybe what I need to understand is how to pass the event on to the underlying flash text field, but that seems less desirable.

More generally any advice on how to start understanding the internals of LFC would be helpful and appreciated.

Thanks,
Daniel.
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to