Skip to main content

TextArea & TextField problem (black berry)

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
7 replies [Last post]
lwuit_hero2
Offline
Joined: 2011-03-13

Use last svn

The problem is
when I make TextArea.setEdittable(true);
& I edit text .. then field not remove when I go or back to other form!!!
still in the screen!!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lwuit_hero2
Offline
Joined: 2011-03-13

Thanx mahdi & longj2me

but suppose lwuit team fix this huge issue in new lwuit 1.5 version !!

TextFiald & textArea in all apps!!

please my friends fix that quickly I must finish my project in this week :(

longj2me
Offline
Joined: 2010-03-25

hi all

BlackBerryImplementation.java (i'm use current SVN and Ports RIM) try edit :

public void editString(final Component cmp, final int maxSize, final int constraint, final String text, int keyCode) {
// TextArea txtCmp = (TextArea) cmp;
// if((txtCmp.getConstraint() & TextArea.NON_PREDICTIVE) == 0){
// nativeEdit(txtCmp, txtCmp.getMaxSize(), txtCmp.getConstraint(), txtCmp.getText(), keyCode);
// }

EditPopup editScreen = new EditPopup((TextArea) cmp, (constraint & TextArea.PASSWORD) != 0, maxSize);
// blocking call.
editScreen.startEdit();
editScreen = null;
}

work fine on all version blackberry.I'm tested (File attachments)

lwuit_hero2
Offline
Joined: 2011-03-13

Thanx longj2me That work fine, you are really hero

but with native blakberry Dialog ..any Solution for that ?

other thing calender have problem in last Svn in RIM port!!

The Day fouc not move!!

mahdi_hijazi
Offline
Joined: 2010-01-15

I have also problems on TextField and TextArea, it seems that it is related to your problem, so let me clearify the problem:

1. There is no way to leave the TextArea once you start editing (at least I couldn't find a way)

2. The TextField finish editing only if I press the Enter key, though it was working also using the ok button(track ball) and now it is not.

I am using the head of the svn, and vpris ports.

Here is the code to reproduce, nothing special just use them in a normal form:

public class TestTextArea extends MIDlet {

protected void startApp() throws MIDletStateChangeException {

Display.init(this);

try {

Resources resources = Resources.open(this.getClass().getResourceAsStream("/theme.res"));

UIManager.getInstance().setThemeProps(resources.getTheme(resources.getThemeResourceNames()[0]));

} catch (Exception ex) {

ex.printStackTrace();

}

TextArea txtArea = new TextArea("test1");

TextField txtField = new TextField("test2");

Form form = new Form("Test Text area");

form.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

form.addComponent(txtArea);

form.addComponent(txtField);

form.show();

}

protected void pauseApp() {

}

protected void destroyApp(boolean unconditional) {

}

vprise
Offline
Joined: 2003-11-07

I committed a fix for this, thanks.

vprise
Offline
Joined: 2003-11-07

Sorry about that, I seem to have broken this in my last commit (only tested on touch devices). I'll try to restore that functionality soon.

longj2me
Offline
Joined: 2010-03-25

hi all

Use svn:https://svn.java.net/svn/lwuit-incubator~svn/trunk/thorsten_s/bb work fine on all version blackberry.I'm tested (File attachments)