Thanks Matt. Unfortunately, I can't do anything with that. Maybe I dont't have the right understanding of events. I don't want a member function of MyCustomObject to fire the event. It needs to be fired from somewhere else: There can be specified one function which is called at the begin of my event process, the state update callback. Then, depending on some data, myEvent is fired for some objects. For all existing objects, there are four criterion to fire the event: 1. myEvent should be specified as event (of course) 2. the stateUpdate callback function is called 3. the date stata contains certain information 4. the object contains certain data where the last two criterion are associated.
At the moment I don't have any object that controls the data input/output. If needed, I got no problem to introduce one. Perhaps there is a possibility to fire events on data changes? Than I could bind myCustomObjects' data to this data object... Some general infos and a strategy for me would be great! David Quoting Matthew Gregory <[email protected]>: > This is quite simple: > > qc.Class.define("MyCustomObject", > { > events: > { > "myEvent" : "qx.event.type.Data" > }, > members : > { > foo : function() > { > this.fireDataEvent("myEvent", [any data here]); > } > } > > }); > > Should be straight forward to understand, if not then don't hestitate to > ask for an explanation > > HTH, > Matt > > David Nellessen wrote: >> Hi, >> >> we have started developing an application using qooxdoo for ui inside >> google wave gadgets. And here is my question: >> >> I want to create some kind of custom event. I haven't found much >> documentation on that. >> The wave api offfers to specify a callback function (and a context for >> the callback) for state updates, which can be regarded as a very general >> event. I want to distinguish this general event. Depending on the data >> stored in the state object, i want to fire some special events. So what >> I need is one object - maybe event handler is my friend? - which has a >> member function, let's say fireMyEvents, which is set as callback for >> the state update event. fireMyEvents analyses the state data and fires >> events on all objects that were added a certain custom event type. >> Actually that would do what I want. But I am not so familiar with >> events, so I explain what I want to end up with. Maybe I need something >> totally different. >> >> At the end, I want to use something like >> >> mbj = new MyCustomObject(); // supports event type "myEvent" >> mbj.setId("myId"); //sets Id property >> mbj.addListener("myEvent", myFire()); >> >> If the state data is updated and contains myId in some specified way, >> myEvent is fired on for mbj. >> >> That was what I want. I guess the distinction of the object ID is done >> by a member function of MyCustomObject. But I still need to start it on >> state updates for every object that was added myEvent listener. And I >> can only specify one callback :-( How do I get started? >> >> Thanks for your excellent work on qooxdoo!! >> >> David >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
