Screen loses focus

When I disabled and enable the buttons my screen loses foucs. I can scroll the screen to the bottom, but one cannot select buttons active or active fields. I can select buttons and text before calling the changeFormState. All the buttons are on the same horizontal Manager. Please help?

  private void changeFormState(int newState) {
        switch (newState) {
            case STATE_LOGGED_IN :
                loginButton.setEnabled(false);
                logoutButton.setEnabled(true);
                changePasswordButton.setEnabled(true);
                forgotPasswordButton.setEnabled(false);
                registerButton.setEnabled(false);
                setFocus();
                state = STATE_LOGGED_IN;
                break;
            case STATE_LOGGING_IN :
                loginButton.setEnabled(false);
                logoutButton.setEnabled(false);
                changePasswordButton.setEnabled(false);
                forgotPasswordButton.setEnabled(false);
                registerButton.setEnabled(false);
                state = STATE_LOGGING_IN;
                break;
            case STATE_LOGGED_OUT :
                loginButton.setEnabled(true);
                logoutButton.setEnabled(false);
                changePasswordButton.setEnabled(true);
                forgotPasswordButton.setEnabled(true);
                registerButton.setEnabled(true);
                setFocus();
                state = STATE_LOGGED_OUT;
                break;
            case STATE_LOGGING_OUT:
                loginButton.setEnabled(false);
                logoutButton.setEnabled(false);
                changePasswordButton.setEnabled(false);
                forgotPasswordButton.setEnabled(false);
                registerButton.setEnabled(false);
                state = STATE_LOGGING_OUT;
                break;
            default:
                loginButton.setEnabled(true);
                logoutButton.setEnabled(false);
                changePasswordButton.setEnabled(true);
                forgotPasswordButton.setEnabled(true);
                registerButton.setEnabled(true);
                setFocus();
                state = STATE_LOGGED_OUT;
                break;
        }
    }

I had strange things at various levels of the OS, when I setFocus on a field that is not active, or do unfocusable, the field that has the focus.  May I suggest for each path through the code, you make sure that there is a field that has the focus and deliberately activate this field before doing anything unfocusable.

Also, I'm not sure that just call setFocus will perform a job here, because the screen already has focus.  I think you need to focus on a field.

Tags: BlackBerry Developers

Similar Questions

  • App/screen loses focus after closing the Menu

    I'm having a very strange problem with an application that tries to make it backward compatible for 4.2 and devices. Whenever I hit the BB button to display the menu, the screen loses focus and the thread stops to repaint. Currently I use a thread to continually update the screen. the app does not lose focus, as I can always press the BB button and force the screen to repaint only once, even if the fields do not update. The device, on which I'm testing is 4.5.0.77 Pearl 8130 (3.2.0.51).

    I found this question... I had the break and live variables in the same control in the thread, so a break killed the wire...

  • APP crashes when closing a screen, loses focus and said having no screens

    I'm learning the basics for development of Java for BlackBerry, the version I use is 6 SDK.

    While working on an example provided in my workplace, I came across a bug that causes the app freeze and stop to respond to user input after the closure of a screen. The console output showed a message saying:

    Application in the foreground * lost focus because it has no screens.

    which is weird, because a screen again. After that without this intervention can be made with the soft, I'm only able to hold the button menu to select go to the home screen, but if I try to enter the app is still frozen in the last window, I even rebooted the device and the app has remained the same (I do not know if this kind of persistent behavior is normal in the development of BlackBerry).

    Just uninstall and then reinstall the soft manages to "solve this problem."

    I checked the sample project and there is a class called ScreenManager which is implemented to manage the screens shown on the app. He keeps a vector of the stack of the current screens are displayed. This class is mainly used to manage paths inside the application, for example if I executed the action j Screen C, rather than return to Screen B, show screen F.

    Each class that extends the screen has its onClose overloaded method:

    public boolean onClose() {}
    ui.getSm () .back (null);
    Returns true;
    }

    to call a function named return on this class of ScreenManager, which checks the current state of the stack of the screens, if the vector object has only one object, then a dialog box asks the user what to do, if you close the application or stay in the app. Where there is more than 1 screen in our vector object, then simply call the method that executes the anti-pop call:

    {} public void back()
    If (pageStack.Size () - 1 == 0) {}
    a single screen in stack, see the dialog box asking if the user wants to close app
    choose int = Dialog.ask (Dialog.D_YES_NO,
    ui.getRb () .getString (IU. EXIT_YES_NO));
    if(Choose==Dialog.Yes)
    {

    System.Exit (0);
    }
    } else {}

    Method that handles the anti-pop call and removes the current screen of our vector object
    popPageStack();
    }
            
    }

    The popPageStack method looks like this:

    private void popPageStack() {}
    pageStack.removeElementAt (pageStack.size () - 1); remove the object that represents the current screen
    UiApplication.getUiApplication () .popScreen (UiApplication.getUiApplication () .getActiveScreen ()); remove the current screen of the application
    }

    Because this entire logic is called when fires the onClose method, I do not understand how I can "run out" of screens, especially since the console is saying there are not and a screen is still displayed.

    What caused this problem in the application? Is it posible to pop the entire screen in the application and still be in the app?

    EDIT

    I did a little test of my own project and placed a menu item when you press on removes the only window I have and the behavior I described above is checked.

    For some reason any test project, I am student pop all of its screens when you press return, but I don't understand how is it still possible. What I am pressing too fast back button and it is somehow triggering several persistent organic pollutants?

    The situation you described happens when you last screen of pop on the BlackBerry 'view stack' but does not close the application.  Thus, the Blackberry operating system still tries to display something for the application and which is usually the last screen was displayed. However this isn't a real screen, so there is no interaction, like indeed the application has hung.  There no, there just no screens.

    Now, you are going to say that can't happen because you keep track of the screens in the stack.  But sorry, I would say that this is what is happening and there is a bug in the management of battery screen.

    In my opinion, it is a potential bug in the management of your stack.  I think you should recover the real of the Vector and pop screen than the screen, not that active.  You can also check to make sure that the screen that you are appearing is active.  Then allows you to detect when the battery of the screen that you have is not synchronized with the BlackBerry screen battery.

    I don't know why your application is now its own stack of anyway, given that the Blackberry has a display of the battery itself.  You can browse the BlackBerry screen battery using getActiveScreen(), then getScreenBelow().

  • The screen minimizes or loses focus without reason in Vista

    I have a Dell Studio XPS 435 t with Windows Vista Home Premium 64-bit.  I have tried to disable my antivirus (Norton) and that you have disabled my interned so connection and screen has further reduced or loses focus a lot.  I don't have AVG on my system and I tried to uninstall and reinstall DirectX without a bit of luck.  I also check the Task Manager when this happens and it doesn't show anything else running at the same time.   It drives me crazy.  Any help would be greatly appreciated.

    Hello

    Method 1: I suggest that you put the computer in a clean boot and see if the problem still occurs:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 2: I suggest that you follow the steps in the link and check if that helps:

    http://support.Microsoft.com/kb/303032

  • How can I prevent Windows Media Player and other programs exit full screen when they lose focus?

    What I would do to prevent the release of the mode full-screen when it loses focus after another object with the focus on the main Windows Media Player display and other programs on a secondary display? In addition, the object on the secondary screen, whether full-screen mode or not, will disappear for a second and reveal the desktop background whenever I have use Aero Peek to select items in the taskbar on the main screen. How would prevent that from happening as well?

    All you need to do for WMP is right click Select display, then always on top

  • Active window loses focus

    All past this problem recently. It began not with an upgrade of the OS, if I had just restarted the computer after having been passed away on a trip.

    The active window, I have been working in suddenly loses focus, sometimes in the middle of a Word, I care. A moment I am typing away and all goes well and the next moment every keystroke causes a "thunk" sound effect and I look for my strikes were not registered and the three tasks in the upper left corner color (buttons close, reduce and fullscreen) are grayed out. I do a mouse click in the window to make it active again, and all is well for a while until that happens some time later.

    OS X 10.11.3

    iMac, retina 4K, 21.5 inches, end of 2015

    When you find the problem, note the exact time: hour, minute, second.

    These must be run as administrator. If you have only one user account, you are the administrator.

    Run the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    The title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    Each message in the journal begins with the date and time when it was entered. Highlight date back to the time you noted above.

    Select the messages entered since then until the end of the episode, or until they begin to repeat, whichever comes first.

    Copy messages to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost all this is useless to solve any particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name, may appear in the log. Anonymize before posting.

    When you post the journal excerpt, an error message may appear on the web page: "you include content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • Application loses focus when clicked outside the region

    Hello.

    We have created the apex 4.2.5 application.

    Application has a small region (quarter of the screen space).

    When the user clicks outside this region, application loses focus.

    Is it possible to disable click outside the region, or when you click on it on the outside, place the cursor on the element in the region?

    Thank you.

    Kind regards

    Dejan

    AAAAA, he found myself (dynamic action).

    Thanks anyway.

    Kind regards

    Dejan

  • Firefox loses focus of the window when I switch to Windows user accounts

    If I have Firefox running in a single Windows account and switch to a different account (where I do not use Firefox) and then back to the account where Firefox is running, and I have to open a new window in Firefox, Firefox loses focus (in other words, I can't use the new window unless I first bring back highlight on the desktop.) ... and, no, it's not a Windows problem, as another program will include an expected. It's just Firefox that does this. Very annoying, btw.

    [Oh and mods, please reopen my previous thread, I wasn't done with it, thank you.]

    I tried Flash 15 and blow me over with a feather, it works! Adobe * actually * fixed something to change. * faints *.

  • Firefox frequently loses focus of the window

    It seems that Firefox frequently loses focus of the window when I opened a new page. It can be a bookmark, a link open in a new tab using CTRL-click left or whatever. The following scenario always translates into the window loses focus (for me).

    1. Open Firefox.
    2. Open this link and save it.
    3. Close, and then reopen Firefox.
    4. Open the page just a bookmark using the bookmarks list and do not touch the window.

    I read this page a day, so when I launch Firefox and open the page, I click on it in order to scroll, etc...

    Firefox 13, Windows 7 Home Premium 64-bit

    I wish this site had 'Preview' for its positions. Geez Louise.

    This can be caused by a recent update of Flash 11.3.

    See:

    You can also try 11.2 Flash you can download it via this link:

  • Firefox loses focus - titlebar to high gray goes - if a new Web site is visited.

    If, say, the URL of a website is put into the address bar and Firefox opens in a new tab in the normal way and then loses focus of the firefox window, the bar of the window in high greys out. I have to click on the page to restore the development.

    This has a much more irritation value as it might seem.

    Same thing with clicking on a Web site, say, google.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    If this does not work in mode without failure, then disable all extensions and then try to find out who is the cause by allowing both the problem reappears.

    • Choose "Disable all add-ons" on issues to troubleshoot Firefox in Safe Mode to set window to disable all extensions.
    • Close and restart Firefox after each change through "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')
  • Address for new tabs bar loses focus after you type the first character

    All new tab to open switches focus to the bar address (which I do), but as soon as a beginning by typing, I can get more than 3 or 4 characters before it loses focus, and no other keys are entered.

    I have a load of search keyword set up, rather than using the separate search bar, so I can't for example, quickly hit Cmd + T to bring up a new tab and then type "im [keyword]" to search Google Images directly.

    The problem is now that I can get the first letter, perhaps the first, but cant type anything else because the address bar loses focus.

    This has happened

    Each time Firefox opened

    == 3.6.4 unknown, downloaded to test, he did for the first time since the installation.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of your modules is causing your problem (switch to the DEFAULT theme: Tools > Modules > themes).
    See the extensions, themes and problems of hardware acceleration to resolve common troubleshooting Firefox problems and troubleshooting questions with plugins like Flash or Java to solve common Firefox problems

    If this does not work in safe mode and then disable all your extensions and then try to find out who is causing by allowing both the problem reappears.
    You can use "Disable all add-ons" window the startup of Firefox to solve the issues in Safe Mode to disable all extensions.
    You will need to close and restart Firefox after each change via "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')

  • Stack 7.10.04 Driver causes Windows 7 to lose focus at random.

    I have this weird experience not only once but twice in two on windows 7 on x 86 and x 64 and it's just this day, I could say that I understood what causes the gene to have your windows lose focus randomly and repeatedly while your typing or do stuff a keyboard or a mouse scroll , then all of a sudden, windows became inactive and active again with a user deliberate action of any of the mouse or the keyboard.

    As if it itself inactive, etc. its windows, the first based on some complaints in the previous version of windows, that a malicious program could trigger this bug however with the arrival of a more secure windows and programs tighter security namely KAV I used its impossible to do such bugs visually annoying to go undetected or even penetrate.

    Last January, I installed the battery and the dongle on my work pc, a windows 7 x 86 and thus find out what mysteriously desruptive bug, but I have no idea that that entails and he presumes some kind of hardware problem but it somehow disappear and this time I didn't recognize the culprit and conclude that perhaps this is just an isolated problem or case by case , but I do remember that I already removed the BT and transferred to my home PC which is a Windows 7 x 64, a newer, faster pc.

    I have installed the Toshiba BT Stack 7.10.04 version x 64 version for Windows 7, I was very happy for her and enough confidence for its compatibility with the new windows and full of hope for a better interface and icon but especially since I was looking for its functionality, this worked surprisingly I me be able to do the things wireless , but at the beginning I was not be able to see a familiar recurring problem until I typed a letter then a plague follows me.

    So I spent enough hours for google a possible answer it was even hard to described as species is in its rarity until I found what corresponded to what I was looking for the link: [(réponses Microsoft Windows perdre le focus, apparemment àle hasard) | http://social.answers.microsoft.com/Forums/en-US/w7desktop/thread/43482cc3-cad3-499f-882c-a436b3ec4798] and followed by these methods very carefully, I tried each program is started until it rolled until BT services and function is obviously the possible cause and it was, bugs is when BT logo on the taskbar icon turns green, or in a search mode, it makes windows outfocus or inactive, then when it becomes white returned to active the current window and so on.

    What I do now is to disable auto-start and run the program on when needed and automatically connect to a BT gadget in order to have a connection established. I hope this bug will be fixed.

    Thank you.

    Do you have any kind of synchronization software installed that uses Bluetooth periodically?

  • My windows guard lose focus when bluetooth is activated

    Hi, I have a problem with my bluetooth.

    When my bluetooth on my laptop computer goes active i.e. "B bluetooth" in the icon bluetooth on the botton in the Windows tray goes from white to green this problem run. At this precise moment, I am working in the current window goes inactive. If I type in a text example box and the bluetooth goes from "white to green", the text box loses focus and I have to click to resume my typing.

    How dow to get rid of this problem and have an accessible bluetooth device?

    Running on Windows XP Pro, computer laptop:
    Bluetooth Stack for Windows by Toshibe
    Version v4.42 (D)
    Bluetooth specification:
    Version 2.0, 1.2, and 1.1

    Thank you!
    Doman

    First of all, you need to update your Bluetooth stack. It seems to be quite old.

  • VI nearby when it loses focus

    Hi guys!

    I have a popup VI I have to close when it loses focus, for example if the user clicks on the program of the mother.  I found an old example in using the property node 'is more', but this node will not give the necessary feedback.

    Have any ideas?

    Thank you!
    Christopher

    Most of the 'Pop up' dialog boxes are modal.  In order to get what you are looking for the pop - up must be "floating".

    Here is a small example that can operate close to what I thing you want - it may need some adjustments

  • 'successful test' window loses focus

    I use a slightly modified version of the example LabView Simple Interface operator vi. I use this for the user to choose what sequence of test to run.

    The problem I have is that many of the standard popups OR keep loses focus when they appear: the "serial number enter DUT" test pass/failure/end of window and Save_As for printing test reports, are all the standard windows OR this presentation pop up and then disappear because the thumb behind the main window of Labview vi.

    I have to use ALT + Tab to scroll through windows and return to any pop-up window lost focus. And the problem is that my client does not accept this!

    Any ideas?

    Thanks in advance,

    Ian

    Hey Ian,.

    I know that you can make a window in labview come forward with nodes of property and a VI the value application server reference. It works within the bodies of labview, but does not retain the focus by other programs. Either does not have a window in front of internet Explorer just to other windows in labview.

    I continue to experiment to find if another parameter will do what you want better. At the same time, it's a start for you to try as well. Let me know how you go with it.

    Matt

Maybe you are looking for

  • Add a new text message Contact in 10 IOS?

    I have the latest IOS update on my iPhone 6 s.  A text message came through with the phone number because I didn't have that person in my Contact list.  When I typed the 'Détails' icon, he was no longer the option 'add a new Contact '.  How do you do

  • Minimize / maximize / close controls missing

    I just upgraded in auto to 10.0 on my Windows 7 (64-bit Home Premium). Upper right window controls have disappeared. How to make a comeback?BTW it's the worst upgrade again, problems with the pinned shortcut on the start menu. Norton struck himself w

  • Satellite L505-10V - using HDMI is no pic on external monitor

    I have a Toshiba Satellite with a broken screen and use an external HDMI monitor.But now it starts but does not fall into the second rotor and shows do not at all. What can be?

  • How to add text to photos

    Is there an easier way to add text to pictures other than going through an excerpt in either Photo or IPhoto?

  • EQ problem since the update, anyone seen this?

    Then got the 10.2.1 update, because then it seems that I can't change the processing mode in the EQ channel more to the side middle, etc, seems to be true for all my instances of the device. Probably something wrong, but what? I almost thought I had