Community
Participate
Working Groups
The Numeric and Decimal-TextRidget don't support the shortcuts CTRL-X, CTRL-V and SHIFT-Insert for cutting and pasting text from the clipboard even if it conforms to the format of that specific ridget. This is a different behavior than all other SWT-Controls.
True, this is not supported at this time. I wonder if it would be ok if we support only complete paste / cut (i.e. paste replaces the complete content regardless of selection, cut cuts the complete content). This would be the easiest to implement...
Yes, that seems appropriate.
Created attachment 215475 [details] This change fix the problem I've fixed the problem by changing line 701 from "String newText = null;" to "String newText = e.text;". Please check the fix. I would be glad if the fix will be integrated in the riena-trunk. Greetings, Tobias
@Tobias, the provided fix does not entirely solve the problem. I wrote a snippet [1] to try it out and succeeded to create an invalid value. Here are the steps to reproduce the problem that I got: 1. Start the snippet (after changing NumericTextRidget) - the value is "0,00" 2. Enter 123 - the value is "123," 3. Ctrl+A to select all text in the text field 4. Ctrl+V, Ctrl+V, Ctrl+V, Ctrl+V ... - the value is "123,123,123,123," Implementing a 'correct' cut & paste behavior which preserves value validity will require some more investigation so I leave this bug unassigned for now. Here is the snippet: [1] http://git.eclipse.org/c/riena/org.eclipse.riena.git/plain/org.eclipse.riena.sample.snippets/src/org/eclipse/riena/sample/snippets/frombugs/NumericTextRidgetBug.java?id=9df6421194d50a6e5a8b95d2f412f3c7aba61358