Touchscreen frozen after Pop of a dialog box.

Hi all

My application will freeze after touch an element on the screen and then pop up a dialog.

After poping dialong, it will freeze, which key that I push, it doesn't work anymore.

Here's my test code. I have not tested on the device, I'm not sure if this will happen on the device.

/*
 * VFMTester.java
 *
 * © , 2003-2008
 * Confidential and proprietary.
 */
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.system.*;
import net.rim.device.api.servicebook.*;
import net.rim.device.api.ui.container.*;

/**
 *
 */
public class VFMTester extends UiApplication{
    public static void main(String args[]){
        UiApplication app = new VFMTester();
        app.enterEventDispatcher();
    }
    VFMTester() {
        pushScreen(new AScreen());
    }

    class AScreen extends MainScreen
    {
        public AScreen()
        {
            super();
            VerticalFieldManager vfm = new VerticalFieldManager();
            for(int i=0;i<20;i++){
                vfm.add(new LabelField(String.valueOf(i+1),Field.FOCUSABLE));
            }
            this.add(vfm);
        }
        public boolean trackwheelClick(int time, int status){
            Dialog.alert("click");
            return true;
        }
        protected boolean touchEvent(TouchEvent te){
            Dialog.alert("touched!");
            return true;
        }
    }
}

You are right.

As usual, you should not call setFocus(), but seems in this case that there is a bug in the user interface event processing.

And the second setFocus() is just a workaround for this bug.

Tags: BlackBerry Developers

Similar Questions

  • What about a required no program that floods the screen with their pop-up windows dialog box explaining why underwriters for their care antivirus

    It is impossible to use my XP computer.  If I click on an ICON to desktop, or any other program, nothing happens. In addition, the screen is filled with their pop-up dialog box. Yes, the block popups is turned on. Any program is selected, except Microsoft Outlook, a message topic infection arises.  "Care ANTIVIRUS SYSTEM" will fix everything if I sign up for their program. Already, I have several programs to do this, but right now can not get any. In the meantime, I'm dead in the water.  The XP system was working fine until this problem appeared. I can't help but think this is a deliberate attempt to acquire a new customer.  And if it is true, the company should be run out of business. Please help me.

    Take a look at the forum anti virus and malware.

    the malware even you have answers there.

  • After popup showPrintablePageBehavior the dialog box print browser

    Is it possible to open the print browser dialog box after pressing a command button with showPrintablePageBehavior?

    Joost

    Hello

    Yes, there is. However, before describing the solution: be aware that the code below uses a setting of internal application which may change in the future without notice. Not that expected still to do, its an implementation detail of the framework that I use.

    Solution
    ======

    1. on the label f: view of the page, create a method beforePhase to a managed bean reference
    2. in the managed bean method (guess you named "beforePhaseMethod"), add the following code

    import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    import org.apache.myfaces.trinidad.util.Service;
    
    ...
    
        public void beforePhaseMethod(PhaseEvent phaseEvent) {
            if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE){
                FacesContext fctx = FacesContext.getCurrentInstance();
                //use of internal request parameter, be aware of it
                Object showPrintableBehavior = fctx.getExternalContext().getRequestMap().get("oracle.adfinternal.view.faces.el.PrintablePage");
    
                if(showPrintableBehavior != null){
                    if (Boolean.TRUE == showPrintableBehavior){
                      ExtendedRenderKitService erks = null;
                      erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
                      erks.addScript(fctx, "window.print();");
    
                  }
                }
    
            }
        }
    

    Frank

  • &amp; quot; Connect to &amp; quot; After CF 8 Upgrade dialog box

    I have this strange question after I upgraded to CF 8. On my pages coldfusion I get this dialog box asking me to connect to (sign) on some site I try to go to. It is just a simple dialog with input of user name and password, and it has the address of the site under the title of the dialog box. I am quite puzzled as to why this would happen. Happens on any computer I try on, is not a local thing, it's certainly a kind of setting on the web server. Any ideas?

    Thank you

    Ben

    I think that I fixed it. I changed a security in IIS setting and that seems to work.

  • remove the pop-up error dialog boxes

    Hi, I was wondering if there is a way to remove the error dialog boxes that are displayed when the type of interface commands. For example, I call the open TCP/IP command and if the port is not available with a stop of execution error, it throws a dialog box. I want to handle the error all the time so I can report the error manually. I don't know there is a way to remove this does not happen. The General error handler is usually to show errors in the dialog box if you wish.

    Thank you...

    To quote what I said earlier: "If you just manage the error, the dialog box should disappear."  And the definition of "handle" for the automatic error handler is that you wire to anything, even an indicator error.

  • After scanning, save as dialog box is always displayed.

    Hello! I use windows 7. Having installed Adobe Acrobat pro DC. Installed all updates after the scanning, the backup that dialogue is not always displayed. What should do?

    Edit > Preferences

  • Cp9: Linking Ctpv projects through a dialog box pop-up on the main project of captivate.

    I run Windows 7 Professional and my version of Captivate is 9.0.1.320.

    Hi all

    I want to join cptv projects using dialogs pop up on the main captivate project, but I don't know how to do it.

    I know that this idea can be implemented on Captivate, since I saw it on another course online.

    Example:

    1. The hyperlink from the button on slide 1 has opened a pop-up dialogue box that has incorporated an other captivate project (see step 2).

    2. when the user has finished watching the embedded captivate in the pop up dialog box.
    then, it closes the dialog box by clicking the X button and goes back to main captivate project (i.e., slide 1).

    3. what the user sees after closing the popup dialog box.

    You may know how I could do this? Is it advanced actions?

    Thank you very much in advance.

    Kind regards
    Iasmi

    I'm sorry, don't understand. Now you're talking about the incorporation of a Captivate demonstration, the original question was a link to another Captivate file. If you want to integrate a CP-demonstration, convert to mp4 and put it in a video. A demonstration is intended for passive observation, which means that a video would be OK. I would have preferred a video demo of better quality, but it is up to you. This last explanation is different from the first.

  • A screen popup menu is opened after the closure of the dialog box

    Hello

    I have a test application with a screen containing a button.

    When I click on the button (pressing the button on my BlackBerry 9220 trackpad), it opens a dialog box.

    Then when I press ESC to my BlackBerry 9220, it closes the dialog box and I'm back on my screen.

    Now, if I add to my screen, a menu item, the changes in behavior:

    When I click on the button (pressing the button on my BlackBerry 9220 trackpad), it opens a dialog box.

    Then when I press ESC to my BlackBerry 9220, it closes the dialog box and opens a menu screen.

    So, I would add my item of menu but keeping the old behavior of my application after you close the dialog box.

    Any idea?

    Thank you.

    Best regards.

    Here is the code:

    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ButtonField;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.MenuItem;
    Import net.rim.device.api.util.StringProvider;
    SerializableAttribute public class TestApplication extends UiApplication
    {
    public TestApplication()
    {
    this.pushScreen (new TestScreen());
    }
    Public Shared Sub main (String [] args)
    {
    Application TestApplication = new TestApplication();
    application.enterEventDispatcher ();
    }
    }
    final TestScreen class extends FieldChangeListener implements screen
    {
    public TestScreen()
    {
    / * MyMenuItem MenuItem = new MenuItem (new StringProvider ("my menu item"), 0 x 230000, 0); * /
    ButtonField myButtonField = new ButtonField ("button my field");
    myButtonField.setChangeListener (this);
    This.Add (myButtonField);
    / * this.addMenuItem (myMenuItem); * /
    }
    ' Public Sub fieldChanged (field field, int context)
    {
    Dialog.Alert ("test");
    }
    }

    Here are a few screenshots:

    It comes from the popup menu. create the button with CONSUME_CLICK would be the simplest solution.

  • PartialTrigger and autoSubmit works in a pop-up dialog box

    Hello

    I have a dialog box pop-up and within a SelectOneChoice which should PPR 2 input text. The rendered property is dynamic.

    The corresponding code:

    < af:selectOneChoice autoSubmit = "true" >

    < af:inputText partialTriggers = "customer id generated by JDev when the choice of the selectOneChoice" / >

    In theory, it should work. I already did it with success outside of a popup.

    I do not understand why, if the code is inside a pop-up window / dialog box, the inputText are not updated. If so I click on the button of the dialog OK, I see the refreshed inputText.

    Is there something special to do when working with autoSubmit, PPR inside a box of dialogue/poupup?

    Thank you

    JDev 11.1.2.4

    I managed to solve the problem. If I use rendered on the inputText, when updated it does not work (the component is always rendered on the screen while it should disappear). If I switch to visible, it works as expected. In any case I don't understand why it's not working but using visible works for what I want to do, so that's fine.

  • View dialog box on powerUp()

    Hello

    I am building an app that does not have a graphical user interface and runs in the background. The application uses PhoneListener to interrupt a call and create a new one in its place. Since I have no GUI I cannot send the keystrokes required to phone until after a dialog box is displayed (either a dialog box, asking permissions of the Application, or by changing the OptionsProvider). What I want to do, it's just pop up a dialog on startup so I can then inject my shots to end the call.

    Here is my code:

    public class GVIntercepter extends UiApplication implements SystemListener
    {
        public static void main(String[] args)
        {
            // register an options provider
            GVIntercepterOptionsProvider provider = new GVIntercepterOptionsProvider();
            OptionsManager.registerOptionsProvider(provider);
    
            // register a phone handler
            PhoneHandler phone_handler = new PhoneHandler();
            Phone.addPhoneListener(phone_handler);
    
            GVIntercepter instance = new GVIntercepter();
            // instance.enterEventDispatcher();
    
            if( ApplicationManager.getApplicationManager().inStartup() ) {
              // Add a system listener to detect when system is ready and available.
              instance.addSystemListener(instance);
            } else {
              // System is already ready and available so perform your start up work now.
              // Note that this work must be completed using invokeLater because the
              // application has not yet entered the event dispatcher.
              instance.doStartupWorkLater();
            }
            // Enter the event dispatcher.
            instance.enterEventDispatcher();
        }
    
        //Invoked when the user is putting the device into a power off state.
        public void powerOff()
        { }
    
        //Invoked when the device has left the power off state.
        public void powerUp()
        {
          Application.getApplication().removeSystemListener(this);
          doStartupWork();
        }
    
        //Invoked when the internal battery voltage falls below a critical level.
        public void batteryLow()
        { }
    
        //Invoked when the internal battery voltage has returned to normal.
        public void batteryGood()
        { }
    
        //Invoked when the internal battery state has changed.
        public void batteryStatusChange(int status)
        { }
    
        private void doStartupWork()
        {
          // Perform your start up activities here!
          Application.getApplication().invokeLater( new Runnable() {
            public void run() {
              Dialog.ask(Dialog.D_YES_NO, "Display?");
            }
          } );
        }
    
        private void doStartupWorkLater()
        {
          Application.getApplication().invokeLater( new Runnable() {
            public void run() {
              doStartupWork();
            }
          } );
        }
    
        public GVIntercepter()
        {    }
    }
    

    I tried almost everything to get the dialog box to display and I am at a loss here. Any ideas?

    Also, I'd be open to suggestions on power sending keystrokes to a background application in the phone app and use PhoneArguments to call without displaying any prompt at all.

    I never thought seriously about doing something like what you're trying to do, so I'm sorry this isn't a complete answer to your questions.  You may use these details to get a little further though.

    You say that your app is a bottom up, however you have extended UiApplication.  If your application is treated as it displays a screen of the user, but you never insert a screen, if your application never gets thrust in the foreground.  You will find that, once you started with your current code, your icon is available in the Task Switcher (ALT + ESC) and if you swap to your application, your dialog box is there to be seen (on a white background, as any UiApplication).  Try it and see.

    You can replace your code in doStartupWork() with something like the following, so that you can see actually started.  Try this and then see what happens when you select your application by using the Task Switcher after you answer your dialog box (note I use UiApplication rather than on request, simply because the code you call later should a UiApplication to run.  Your code works really because you have found your own application, which is currently spreading UiApplication.  If you change it to extend the Application instead, then you will get a UiApplication.

          UiApplication.getUiApplication().invokeLater( new Runnable() {
            public void run() {
                UiApplication.getUiApplication().requestForeground();
                Dialog.ask(Dialog.D_YES_NO, "Display?");
                UiApplication.getUiApplication().requestBackground();
            }
          } );
    

    I suspect that you really want to be a background application.  In this case, you extend Application rather than UiApplication.  Then, to bring something to the attention of the user, you can use UIEngine, as shown here:

    How - to alert a user to a background application
    Article number: DB-00407

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

    Alternatively, you can do what you do, stick your phone earpiece in place, then the UiApplication, the output is not in the Task Switcher.   Even if you have left your UiApplication, your hook is still in place and can still do something.

    I have a point more than related.

    You are actually setting up an earpiece of phone.  When this listener is controlled, it will run the app phone, not your Application.  This application has a GUI, then maybe you need not to use this dialog box "to access a graphical interface.

    Sorry, as stated, I never really looked seriously to do something like what you do, then I do not understand everything and maybe you have this covered.  Bit I hope this helps.

  • to open page dialoge box comes several times

    I have a problem with a pop up dialoge box.  I created the script that, at the opening of the page, you will be asked if this is the first letter or 2nd letter.  A field will display or hide the base on this answer

    This occurs after the other page dialog box open code that checks if there are blank fields and mask models if these fields are empty

    The issue I'm having is that the box pop up asking the user to choose the first or second box - tick the box staff and click OK

    But then the box appears the 2nd time

    While they scroll to the bottom of the page to check one another - the first dialog occurs again

    And Yes, is the code to the open page only once

    It does not stop the form of work, it's just frustrating

    Yes. When you create a script of the doc level, it automatically generates a

    Statement of function with the specified name. You must remove that

    before you paste your code into the window.

  • Suggestion: Firefox would not hold up to a shut down windows with a close multiple tab dialog box.

    I didn't know where to send a suggestions, so he posts here. Please redirect it to the appropriate location.

    When I shut down windows and firefox works with several tabs, it pops up a dialog box and prevents the closure of windows. Last Friday, I shut the computer down before leaving work and found that it was still on when I went back to work Monday. Reason - Firefox.

    I prefer computers stop when I am away for an extended period of time to save energy.

    Tools > Options > tabs: [] "warn me when closing multiple tabs".

  • File dialog box cut the default name

    Hi all

    I recently migrated from LV2011 to LV2012 and I have a problem with the dialog file Express vi. It seems, that in LV2012 the Windows dialog box that appears after invoking the file dialog box, adjust the default name to 14 characters (or rather the chain moves to the left so the first x characters are hidden). Please see screenshot attached screen and VI. It's OK in LV2011 (have tested the same code yesterday on another PC with LV2011). Is there a solution or the solution? This is a minor bug, but given that my application is distributed to a customer who pays it mind rather

    Thank you for your reply, Andrew!

    Your VI not exactly help me with my code, but it helped me to find the path . Unfortunately, when I used your VI, the behavior was exactly the same as with the file dialog box. But I noticed that it works only when I select 'create' to the function input terminal (with "create or replace" or something else I've known the cutting chain).

    Then I tried to override the setting of file express VI dialog box of 'New or existing' on 'New' with this setting, the file dialog box works very well (and there seems to be no difference between 'New or existing' and 'New').

    This problem is solved, thank you once more!

  • Tower or disable Windows features displays the empty dialog box

    I go to control panel > programs and features and click then on "Turn Windows features on or off". I get called "Windows features" dialog box that says "Please Wait". After 45 seconds, this dialog box becomes empty and nothing is displayed.

    I ran the twice System File Checker, but it shows no problem. I did repair Startup (by pressing F8 key so that Vista boots) but the problem persists.

    As suggested on some websites of support, at the command prompt, I have ran reg delete HKLM\COMPONENTS /v StoreDirty but had "error: the system was unable to find the specified registry or the value key.

    I tried http://support.microsoft.com/kb/931712 and it's of no use to me.

    I can't do a system restore I don't know since when this problem started can be 1 month back or can be 6 months because previously I had no need to turn on the features of vista as an option.

    I use a stand-alone HP laptop (Intel Core 2 Duo 2.0 Ghz) with Vista home premium pre-installed, and I also installed SP1. Please do not suggest format me my laptop and do a fresh install of vista that HP never gave me the operating system DVD.

    What should I do now? Help, please!

    Hey Anshul Rastogi,

    Thank you for your response.

    You are able to run updates on your system?

    If Yes please make sure you have all the updates installed on your system.

    Please see the following article to guide you through some troubleshooting steps: http://support.microsoft.com/kb/934538

    Please perform a system update and also walk through the troubleshooting steps in the above article and let us know if any of the two solves your problem then that otherwise we can take the next step and find a solution for you. The next step is to restore your system back a month to see if this is useful, and if not then do a restore of the system to the next restore until you find one that allows your system to the function you are eager to point.

    Robyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • 'Ability to complete NFC services' constant ANNOYANCE dialog box

    Been on L do constant pop-up windows dialog box "ability of NFC services.   pretty random... almost every time I've taken on the phone I get this popup dialog box.

    then if I press CANCEL, it will appeal

    If I press 'Edit services' I go to an another sceen is just a white space with the title 'Available to change Services' ' capacity used for nfc services is $ 115 "CANCEL (gray OK).

    I CAN'T GET RID OF THE POP-UP DIALOG BOX.

    Someone please help.

    I had this since the upgrade to L.

    Looks like it's app of Scotiabank:

    https://www.reddit.com/r/SonyXperia/comments/38jeha/capacity_for_nfc_services_full/

    So far, I've found just turn on NFC prevents from popping up. I don't like leaving on normally, but I'll keep until Nova Scotia corrected with an update. Would rather do than to have to uninstall until here.

Maybe you are looking for