Skip to main content



      Home
Home » Eclipse Projects » Nebula » Copy and Paste with NumberFormatter
Copy and Paste with NumberFormatter [message #60202] Tue, 21 October 2008 13:42 Go to next message
Eclipse UserFriend
Hi,

I am trying to use NumberFormatter and DataBinding with a Text control.
When I insert some number with copy and paste, only the first digit
appears in the text control. When I change the verifyText method form
(line 637 ff)

int d = editValue.indexOf(EMPTY + symbols.getDecimalSeparator()); //
Decimal separator position
for (int i = 0; i < e.text.length(); i++) {
....

to

for (int i = 0; i < e.text.length(); i++){
int d = this.editValue.indexOf(EMPTY +
this.symbols.getDecimalSeparator());
...

it works. So I have two questions:
1. Does copy and paste work with NumberFormatter?
2a. If yes: Can you give mi some hint what to do?

Somebody can give me some help on this?

Thanks in advance.

Leo
Re: Copy and Paste with NumberFormatter [message #60967 is a reply to message #60202] Mon, 08 December 2008 07:01 Go to previous messageGo to next message
Eclipse UserFriend
Leo Niedermeier wrote:

> Hi,

> I am trying to use NumberFormatter and DataBinding with a Text control.
> When I insert some number with copy and paste, only the first digit
> appears in the text control. When I change the verifyText method form
> (line 637 ff)

> int d = editValue.indexOf(EMPTY + symbols.getDecimalSeparator()); //
> Decimal separator position
> for (int i = 0; i < e.text.length(); i++) {
> ....

> to

> for (int i = 0; i < e.text.length(); i++){
> int d = this.editValue.indexOf(EMPTY +
> this.symbols.getDecimalSeparator());
> ...

> it works. So I have two questions:
> 1. Does copy and paste work with NumberFormatter?
> 2a. If yes: Can you give mi some hint what to do?

> Somebody can give me some help on this?

> Thanks in advance.

> Leo

Hi,

I'm facing the same problem in my application.

Did you manage to find the solution or the reason it behaves like that?

I'm looking for the solution that does not involve changing the
implementation of the NumberFormatter class.

I'd be grateful for any tips

Regards,

Andrzej
Re: Copy and Paste with NumberFormatter [message #61605 is a reply to message #60967] Wed, 07 January 2009 16:42 Go to previous message
Eclipse UserFriend
Seems you aren't the only ones with this problem.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=248931

Eric seems to be slow at working on fixes, but nagging through bugzilla
is probably the best way to encourage him.

I have added your change as a patch on the bug, hopefully this will help.

- Andi

Andrzej Urban wrote:
> Leo Niedermeier wrote:
>
>> Hi,
>
>> I am trying to use NumberFormatter and DataBinding with a Text
>> control. When I insert some number with copy and paste, only the first
>> digit appears in the text control. When I change the verifyText method
>> form (line 637 ff)
>
>> int d = editValue.indexOf(EMPTY + symbols.getDecimalSeparator());
>> // Decimal separator position
>> for (int i = 0; i < e.text.length(); i++) {
>> ....
>
>> to
>
>> for (int i = 0; i < e.text.length(); i++){
>> int d = this.editValue.indexOf(EMPTY +
>> this.symbols.getDecimalSeparator());
>> ...
>
>> it works. So I have two questions:
>> 1. Does copy and paste work with NumberFormatter?
>> 2a. If yes: Can you give mi some hint what to do?
>
>> Somebody can give me some help on this?
>
>> Thanks in advance.
>
>> Leo
>
> Hi,
>
> I'm facing the same problem in my application.
>
> Did you manage to find the solution or the reason it behaves like that?
>
> I'm looking for the solution that does not involve changing the
> implementation of the NumberFormatter class.
>
> I'd be grateful for any tips
>
> Regards,
>
> Andrzej
>
Re: Copy and Paste with NumberFormatter [message #592844 is a reply to message #60202] Mon, 08 December 2008 07:01 Go to previous message
Eclipse UserFriend
Leo Niedermeier wrote:

> Hi,

> I am trying to use NumberFormatter and DataBinding with a Text control.
> When I insert some number with copy and paste, only the first digit
> appears in the text control. When I change the verifyText method form
> (line 637 ff)

> int d = editValue.indexOf(EMPTY + symbols.getDecimalSeparator()); //
> Decimal separator position
> for (int i = 0; i < e.text.length(); i++) {
> ....

> to

> for (int i = 0; i < e.text.length(); i++){
> int d = this.editValue.indexOf(EMPTY +
> this.symbols.getDecimalSeparator());
> ...

> it works. So I have two questions:
> 1. Does copy and paste work with NumberFormatter?
> 2a. If yes: Can you give mi some hint what to do?

> Somebody can give me some help on this?

> Thanks in advance.

> Leo

Hi,

I'm facing the same problem in my application.

Did you manage to find the solution or the reason it behaves like that?

I'm looking for the solution that does not involve changing the
implementation of the NumberFormatter class.

I'd be grateful for any tips

Regards,

Andrzej
Re: Copy and Paste with NumberFormatter [message #593129 is a reply to message #60967] Wed, 07 January 2009 16:42 Go to previous message
Eclipse UserFriend
Seems you aren't the only ones with this problem.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=248931

Eric seems to be slow at working on fixes, but nagging through bugzilla
is probably the best way to encourage him.

I have added your change as a patch on the bug, hopefully this will help.

- Andi

Andrzej Urban wrote:
> Leo Niedermeier wrote:
>
>> Hi,
>
>> I am trying to use NumberFormatter and DataBinding with a Text
>> control. When I insert some number with copy and paste, only the first
>> digit appears in the text control. When I change the verifyText method
>> form (line 637 ff)
>
>> int d = editValue.indexOf(EMPTY + symbols.getDecimalSeparator());
>> // Decimal separator position
>> for (int i = 0; i < e.text.length(); i++) {
>> ....
>
>> to
>
>> for (int i = 0; i < e.text.length(); i++){
>> int d = this.editValue.indexOf(EMPTY +
>> this.symbols.getDecimalSeparator());
>> ...
>
>> it works. So I have two questions:
>> 1. Does copy and paste work with NumberFormatter?
>> 2a. If yes: Can you give mi some hint what to do?
>
>> Somebody can give me some help on this?
>
>> Thanks in advance.
>
>> Leo
>
> Hi,
>
> I'm facing the same problem in my application.
>
> Did you manage to find the solution or the reason it behaves like that?
>
> I'm looking for the solution that does not involve changing the
> implementation of the NumberFormatter class.
>
> I'd be grateful for any tips
>
> Regards,
>
> Andrzej
>
Previous Topic:Problem with getFocusCell method in Grid
Next Topic:Grid navigation / selection problems
Goto Forum:
  


Current Time: Sat May 10 09:19:40 EDT 2025

Powered by FUDForum. Page generated in 0.03157 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top