Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
vingilot
Posts: 224
Registered: ‎03-29-2012
My Carrier: Wind
Accepted Solution

Close() popup not working

trying to close a popup screen as shown: 

 

Ok.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
two.deleteAll();
two.add(lockedtext);
power.setLabel("Unlock");
save.add(power);
choicewas = "Unlock";
pboptions[2] = "Unlock";
PowerButtonOptions.setChoices(pboptions);
String code = makenote.getText() + "";
contents[current] = encryption + code + coded;
locked = true;
close();
}
});

it does note close when I run this and I am wondering why. If I just have this, 

Ok.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {

close()

}

});

it will close, why does putting the rest in effect it?

Please use plain text.
Developer
pbrebs
Posts: 40
Registered: ‎09-08-2011
My Carrier: AIS

Re: Close() popup not working

Presumably there's a runtime error, so close() isn't run.

 

To check, wrap the code above the close() in a try..catch.

Please use plain text.
Developer
vingilot
Posts: 224
Registered: ‎03-29-2012
My Carrier: Wind

Re: Close() popup not working

no longer an issue, thanks!

Please use plain text.