Hi Fabian,
What is the value that I should pass for "data" parameter?
Is it the node that needs to be selected?

----- Original Message ----
From: Fabian Jakobs <[EMAIL PROTECTED]>
To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Sent: Tuesday, October 9, 2007 1:23:04 PM
Subject: Re: [qooxdoo-devel] Programatically firing events

Phaneesh N schrieb:
> Hi All,
>
> I am trying to write an user extension for Selenium to test qooxdoo 
> applications. I have already written some enhancements on top of the 
> existing qooxdoo extensions by Robert Zimmermann. I am struck at 
> places where I need to dispatch some events to specific objects on 
> screen. For example if there is a qx.ui.treefullcontrol.Tree on the 
> page an I have a qx.ui.treefullcontrol.TreeFolder object; how can I 
> dispatch the changeSelection event to the tree with the TreeFolder 
> being the selected object. Also, I want a way to do it for other 
> events like DragDrop selecting an item in the list/ComboBox. In 
> qx.core.Target I saw two methods createDispatchEvent (String vType) 
> and dispatchEvent (Event vEvent, Boolean vEnableDispose). Please give 
> an example on how to use them to dispatch events on specific objects. 
> When I complete the extension I want to release it to the community so 
> that others can also test qooxdoo application with Selenium.
>
> Thanks in advance
> Phaneesh
just create the expected event object, e.g.:

var event = new qx.event.type.DataEvent("changeSelection", data);

and dispatch it directly on the object/widget:

treefolder.dispatchEvent(event, true);

You should always set the second parameter to true, so the event is 
disposed after the dispatch.

Best Fabian

>
> ------------------------------------------------------------------------
> Be a better Heartthrob. Get better relationship answers 
> <http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545433>from
>  
> someone who knows.
> Yahoo! Answers - Check it out.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, 
Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel







      
____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, 
and more!
http://tv.yahoo.com/collections/3658 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to