[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] text field, entering text causes exit (code: 128)
|
I have these really odd problem that I have never seen before.
When I start my SWT application (within eclipse. ) it displays properly.
The tabitems can be selected and nothing goes wrong
I can click buttons, select rows in table, nothing goes wrong.
the moment I try to enter text into a text control (any text control)
the jvm exits with code 128.
havign searched the internet, I see this usually means that thejvm
connection has been lost.
Now I have been using eclipse/swt for quite a long time and hav enever
seen this before.
it is now happening with two of my application, but funnily enough not
with some of my other ones.
So i did the usual job of examining the differences.
the onyl difference I can see is that i have housed each text field in
it's own composite, given the text control style SWT.NONE, and placed a
1px margin on the composite. This is to emulate a flat text control with
a border.
other than that, I use GridData.FILL for both horizontal and vertical
justification and grab excesshorizontal space. But the screen diaplys
without a problem so shouls this matter?
anyway I am saying all this because I cannot work out what is wrong.
so repeating every other control works, but when you try to enter
anything into a text field, the app shuts down.
any suggestions would be appreciated
Regards
Steve
code snippet follows
-----------------
// this is how i create all my text controls
// composite, is just a composite with a single column gridLayout, the
// composite is the only child of a tabItem
final Composite canvas = new Composite(composite, SWT.NONE);
final GridData gridData_2 = new GridData(SWT.FILL, SWT.TOP, false,
false, 3, 1);
canvas.setLayoutData(gridData_2);
canvas.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_BLACK));
final GridLayout gridLayout_2 = new GridLayout(1, true);
gridLayout_2.verticalSpacing = 0;
gridLayout_2.marginWidth = 1;
gridLayout_2.marginHeight = 1;
gridLayout_2.horizontalSpacing = 0;
canvas.setLayout(gridLayout_2);
lookupText = new Text(canvas, SWT.NONE);
final GridData gridData_1 = new GridData(SWT.FILL, SWT.FILL, true,
false);
lookupText.setLayoutData(gridData_1);
lookupText.setBounds(0, 0, 114, 13);
lookupText.setTextLimit(13);
lookupText.setText("0000");
-------------------