Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
Leo Niedermeier is currently offline Leo Niedermeier
Messages: 4
Registered: July 2009
Junior Member
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
Andrzej Urban is currently offline Andrzej Urban
Messages: 2
Registered: July 2009
Junior Member
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
Andi Thomas is currently offline Andi Thomas
Messages: 38
Registered: July 2009
Member
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
Andrzej Urban is currently offline Andrzej Urban
Messages: 2
Registered: July 2009
Junior Member
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
Andi Thomas is currently offline Andi Thomas
Messages: 38
Registered: July 2009
Member
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: Wed Apr 16 23:54:50 EDT 2014

Powered by FUDForum. Page generated in 0.04226 seconds