|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Simulator: how to type text inside a editable cell of a table ?The answer may be very simple, but I could not find any: how can I type some
text inside an editable cell of table with the Simulator ? I tried qxClick("qxh=mytable", "row=42, col=0, double=true"); type("qxh=mytable", "some text"); but this does not work. The only way I've found is qxClick("qxh=mytable", "row=42, col=0, double=true"); keyPressNative(/*keycode number corresponding to a java.awt.event.KeyEvent*/); keyPressNative takes no locator as an argument, and since the cell is focused and is in "edition state" thanks to the qxClick command, this works. But with this method I have to call keyPressNative for each character I want to type, not to say that to type capital A, I must do: keyDownNative(/*value of VK_SHIFT*/); keyPressNative(/*value of VK_A*/); keyUpNative(/*value of VK_SHIFT*/); I haven't found any easy way to convert a String into a KeyEvent sequence, and just don't want to code such a function :s (because of accentuated or non-alphanumeric characters I can't just do something like get the string representation of KeyEvent.class.getField("VK_" + Character.toUpperCase(mychar)); ). -- Loïc Bresson ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Simulator: how to type text inside a editable cell of a table ?Found what to do.
Since the celleditor is a TextField, I can use the following: type("qxh=mytable/*/qx.ui.form.TextField", "some text"); Loïc Bresson -- Novlog wrote: > The answer may be very simple, but I could not find any: how can I type some > text inside an editable cell of table with the Simulator ? > > I tried > qxClick("qxh=mytable", "row=42, col=0, double=true"); > type("qxh=mytable", "some text"); > but this does not work. > > The only way I've found is > qxClick("qxh=mytable", "row=42, col=0, double=true"); > keyPressNative(/*keycode number corresponding to a java.awt.event.KeyEvent*/); > > keyPressNative takes no locator as an argument, and since the cell is focused > and is in "edition state" thanks to the qxClick command, this works. > But with this method I have to call keyPressNative for each character I want to > type, not to say that to type capital A, I must do: > keyDownNative(/*value of VK_SHIFT*/); > keyPressNative(/*value of VK_A*/); > keyUpNative(/*value of VK_SHIFT*/); > I haven't found any easy way to convert a String into a KeyEvent sequence, and > just don't want to code such a function :s (because of accentuated or > non-alphanumeric characters I can't just do something like get the string > representation of KeyEvent.class.getField("VK_" + > Character.toUpperCase(mychar)); ). > -- Loïc Bresson ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
| Free embeddable forum powered by Nabble | Forum Help |