Marc Puts-2 wrote: > > Hi, > > What are you trying to do? > > The selection property of a selectbox is a qx.data.Array, so its change > event is triggered when the data of that array changes. The event data > must be a map with the keys start/end/items/type (see [1]). > > Why would you want to fire it manually? If you're trying to set the > selection, you should manipulate the array. > > var selection = selectBox.getSelection(); > selection.removeAll(); //deselect everything > selection.push(someItem); //select someItem > > Regards, > Marc > > [1] http://demo.qooxdoo.org/1.4/apiviewer/#qx.data.Array~change > > I have a VirtualSelectBox that controls the items displayed in a list. > I also have a checkbox that if checked disables the selectbox and shows > all elements of the list. When I untick the checkbox I want to enable the > selectbox and show again the elements of the list according to the > selection in the selectbox. > I thought I could do it by firing the "change" event when I untick the > checkbox but doing selection.removeAll() like you explained did the trick. > > Thanks. > > > > On 05/11/2011 05:12 PM, dabd wrote: >> I would like to triger the "change" event on the selection of a >> VirtualSelectBox. >> >> At first I tried >> selectBox.getSelection().fireEvent("change"); >> >> But this gave me an error that said it expected a qx.event.type.Data and >> not >> a qx.event.type.Event so I tried: >> >> selectBox.getSelection().fireEvent("change", qx.event.type.Data); >> >> Now I get this error and I have no idea what it means: >> Uncaught TypeError: Cannot read property 'start' of undefined >> >> Thanks. > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >
-- View this message in context: http://qooxdoo.678.n2.nabble.com/Trying-to-trigger-event-with-fireEvent-tp6352262p6352357.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
