Hi All I am trying to build support for Control-C/Control-V to copy and paste table rows. It already has a right click menu that has the copy-paste options. But I wanted to extend the keyboard support to it.
I tried using the qx.core.Command to handle Ctrl C/V, but I could not detect the widget that was focused when the command is executed. For example I have a form that has two textfields (a name and group). I highlight the value of the "name" field and exec Ctrl-C. In the command "execute" listener, I use "qx.ui.core.FocusHandler.getInstance().getFocusedWidget()" to get the active widget, but I never get the correct widget. I get the container pane of the form. I have implemented my own Clipboard class to store the copied value, but this always fails as the focused widget is usually the container pane. Having my own clipboard class also allows me to share the copied value between keyboard and menu copy/paste actions I can create a mixin that provides handlers for the focusin and focusout events and update a global variable containing the active widget. But there must be a cleaner way to do this. The work flow I am hoping for ideally is 1. Ctrl C/V executed, handler called (using Command) 2. Be able to get the right widget that is in focus 3. If it is a table, execute custom copy handler 4. If not a table, execute standard Ctrl-C/V handlers Right now, I am having trouble with step 2 and not sure how to do step 4 Thanks for your help Jacob -- View this message in context: http://qooxdoo.678.n2.nabble.com/Control-C-V-for-Tables-tp7559392.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
