Note that there are some explanatory texts on larger screens.

plurals
  1. POPopUpScreen Blocking events in Blackberry
    primarykey
    data
    text
    <p>I am using a popup screen to show the update status of background uploading processes. I want to cancel the uploading in between. I am trying to achieve this either by addin a button to the pop up screen or with the physical backbutton of the device. But it seems that none of the events generated are caught by the app.</p> <p>Here is how I am creating a popup screen and displaying it t user</p> <pre><code> DialogFieldManager manager = new DialogFieldManager(); //DialogFieldManager manager = (DialogFieldManager)getDelegate(); statusUpdate = new LabelField("Please Wait..."); manager.addCustomField(statusUpdate); _gaugeField = new GaugeField("", 0, 100, 0, GaugeField.PERCENT); manager.addCustomField(_gaugeField); cncl_Btn = new ButtonField("Cancel",ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER | ButtonField.NEVER_DIRTY); manager.addCustomField(cncl_Btn); cancelFlag = 0; cncl_Btn.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field field, int context) { // Auto-generated method stub UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { cancelFlag = 1; //onClose();//as this method exited from application // close();//this method gave me IllegalStateException } }); } }); //BackUpScreen.this.addMenuItem(_viewItem); popup = new PopupScreen(manager); UiApplication.getUiApplication().pushScreen(popup); </code></pre> <p>Soon afther this line I am calling the actual upload process in a thread like this</p> <pre><code>UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { //.... do other stuff I wanted done... backUpThread = Thread.currentThread(); uploadItems(); } }); </code></pre> <p>But if I press the cancel button inside the popup screen its not responding. I checked this by adding a breakpoint inside the fieldchange listener method of button.</p> <p>How can I do this in blackberry?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload