Michael, Martin
I have been firing events and have not been declaring them in the class
section as Martin suggested and they work fine.
in the following, 'this' refers to my fieldChooser widget where I fire the
event
if ( value != this.getFieldValue() ) {
this.fireDataEvent("changeSelection", { 'value':
value, 'field': this.getField() });
}
and I listen for it in another widget
// changeSelection
this.fieldChooser.addListener("changeSelection",
function(e) {
e.getData()['field'].setValue(
e.getData()['value']);
});
It would be easy enough to declare the event, but I am wondering why it
works with or without the declaration.
tom
Martin Wittemann wrote:
>
> Hello Michael,
>
> i guess you missed the declaration of the events in the class section.
> As you can see in most of the framework classes like qx.ui.basic.Label
> there is an additional section called events on the level of the
> members and properties. There you have to define your events.
>
> events : {
> /**
> * Comments...
> */
> "eventName" : "qx.event.type.Data"
> },
>
> You can take a look at the documentation to see some more details:
> http://qooxdoo.org/documentation/0.8/oo_feature_summary?#events
> http://demo.qooxdoo.org/current/apiviewer/#qx.Class~define
>
> Best,
> Martin
>
>
> Am 11.05.2009 um 12:05 schrieb Michael Ochs:
>
>> Hi,
>>
>> I'm trying to monitor my data model from some listeners. But when I
>> try to add a listener like this:
>>
>> entry.addListener("dataChanged", this.entryUpdated, this);
>> entry.addListener("dataRemoved", function(e) { //entry asked for
>> remove from list
>>
>> console.log(e);
>>
>> delete(this.__entries["" + id]);
>> },
>> this);
>>
>> I get an error that says:
>> There is no event handler for the event 'dataChanged' on target
>> 'matdb.entry.EntryModel[1m]'!
>> There is no event handler for the event 'dataRemoved' on target
>> 'matdb.entry.EntryModel[1m]'!
>>
>> What am I missing here? How can I add such an "event handler"? My
>> class EntryModel uses the this.fireEvent("dataChanged") and
>> this.fireEvent("dataRemoved"); method to fire the events. Do I have to
>> add something else to the class?
>> The dataChanged-events work. They call the listener function, but why
>> is it throwing this error?
>>
>> Thanks for your help,
>> Michael
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>> Your
>> production scanning environment may not be a perfect world - but
>> thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW
>> KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://www.nabble.com/%22there-is-no-event-handler%22-tp23480508p23484214.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel