Open JITHU1903 opened 1 year ago
The number entering to the field first is non problematic field when opened in RCP The number entering second time is when opened in RAP
Hi
Can you please post a sample code that reproduces the bug ?
I think it will be difficult to find people who are cumfortable with RAP... Do you think you can provide a patch ?
Laurent
the sample is very similar to the example snippet 1 provided NumberFormatter, instead I am using MaskFormatter
package org.eclipse.nebula.snippets.formattedtext;
import java.util.Locale;
import org.eclipse.nebula.widgets.formattedtext.FormattedText; import org.eclipse.nebula.widgets.formattedtext.MaskFormatter; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell;
public class MaskFormatter { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout());
Locale.setDefault(Locale.US);
FormattedText text = new FormattedText(shell, SWT.BORDER | SWT.RIGHT);
text.setFormatter(new MaskFormatter("(###) ###-###"));
GridData data = new GridData();
data.widthHint = 100;
text.getControl().setLayoutData(data);
shell.open();
while ( ! shell.isDisposed() ) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
Sorry for my late answer. Do you think you can provide a patch ?
I have a formatted text field and a mask applied to it. when typing numbers in the field the typed number fields will appear randomly in RAP..
To give more context of the behaviour for example i have a mask applied to the field (###) ### - #### and I have numbers partially filled (123) 4- and try to insert a 5 (i.e. (1235) 4 before it corrects the value) this is the input to MaskFormatter.insetText(String txt, int start)
In Non-RAP it is reconciling 1 character at a time but in RAP it is trying to do it with the whole string.