How to properly close a BBUI.js screen?

Hello world

When writing my application, I ran into a problem:

I got a screen that periodically triggers a script using setInterval().

When I go to another screen and return to the screen with a periodic script, the periodic script fires twice and so forth (5 x open = lights 5 x).

I've rechecked on loops or bugs in my code and found nothing.

I'm using BBUI.js 0.9.6 and I use bb.pushScreen () to go to the other screens.

I tried to run bb.popScreen (), but demand appears to hang (gray screen, must start the app).

Could you tell me how to properly close the screen, or at least to stop the execution of JavaScript on account of the screen before moving on to another screen?

Thank you.

setTimeout/setInterval returns an ID that can be used in conjunction with clearTimeout() don't / clearInterval stop subsequent calls. Navigation in out of the page, I would first of all clear intervals.
https://developer.Mozilla.org/en/docs/Web/API/window.setInterval

As a general rule, anti-pop tends to be used to close any screen which is presented in the display through pushScreen, with the exception of the first screen that view you as there is no screen 'parent' to return.

Tags: BlackBerry Developers

Similar Questions

  • How to properly close a stream of customer?

    Hello

    I had problems with the Manager of onPeerConnect invoked by the customer flow ghosts that previously (narrow) have their flow of data from the stream server.

    What is the right way to close a client netstream from the server?

    theNetStream.close () seems to always make the. onPeerConnect() be invoked when the server republish on the same stream name.


    There are two close cases, and it is not in your message that you want to say, so I'll deal with them.

    If the Publisher stops publication but subscribers not to churn, so when the editor re - edits * should * get the onPeerConnect calls again for subscribers and subscribers should see the recently published stream. This behavior is consistent with the client-server publication and subscription through FMS.

    If a subscriber cancels their subscription (by saying netStream.close ()), the Publisher sees a NetStream.Connect.Closed event. If the editor unpublishes and to later published again, he seems to see onPeerConnect calls to subscribers, even if without subscription. I checked that the underlying network P2P RTMFP connection between the Publisher and the Subscriber is demolished (after a 5-minute rest period), but the NetStream objects that represent in the editor persist. This seems like a bug to me.

    It seems that these objects will disappear when the garbage collector runs and calls to onPeerConnect for them will stop.

    -mike

  • How can I configure windows 8 tiles screen as my default page, instead of going to my office eveytime I close a program?

    How can I configure windows 8 tiles screen as my default page, instead of going to my office eveytime I close a program?

    I posted earlier today that I had the same problem, but I think it is now resolved.  In the search engine, type bar of tasks and navigation.  Under Navigation, there are several areas, which is to return to the office from the beginning and end of programs.  In my case, this option is checked.  I have no idea how he became verified that I just started having the problem... a week ago but it is now disabled and the problem seems to be resolved.  I hope this helps!

  • How can I close Firefox (closed) if properly run two windows with multiple tabs in each and I want to save them all?

    How can I close Firefox (closed) if properly run two windows with multiple tabs in each and I want to save them all? I tried to close each window by clicking the X in the top right, and then restart Firefox only loads the last closed window. Is it possible to close Firefox so it restarts with both windows?

    Hi osenochen, some additions to the first response:

    • You can display the classic menu temporarily bar by pressing Alt or F10 to access the file menu
    • There is also an icon of 'power' at the bottom of the graphic application menu (the one which is displayed by the button "3-bar" menu) If you prefer
    • If you closed a window and you want to re - open, go to the history menu and see a list of recently closed windows (by default, up to 3 windows closed are stored and can be re-opened - not applicable to windows private)
  • How do I close Firefox on Android?

    Jellybean Android 4.2.2 on a Samsung Galaxy tab 3 SM-T310 with Firefox 29.0.1.

    How do I close Firefox when finished? I know there is an add-on for it, but want as less as possible unnecessary things. In addition, he takes a default action normal for any application.

    Only way I can see to closing of Firefox is through task manager Android. Or am I missing something?

    If your device provides the Android application selector button that can drag applications off the screen to the left or the right. If it does not long pressing the home button.

    http://www.droid-life.com/2013/02/27/how-to-quickly-kill-off-or-switch-to-recently-used-apps-beginners-guide/

  • How can I close apps

    How to correctly close apps

    Press the home button and go to the next application. The application closes automatically. If an application is frozen on the screen you have to doulbe clck the home button and up - drag the preview of the app.

  • I have a problem with my samsung R60plus. Whenever I am in stop, he fails to close and sometimes it restarts when it didn't close. A blue screen appears

    I have a problem with my samsung R60plus. Whenever I am in stop, he fails to close and sometimes it restarts when it didn't close. A blue screen appers and this are some of the info it shows. Problem signature: problem event name: BlueScreen the system Version: 6.0.6002.2.2.0.768.3 locale ID: 2057 of additional information about the problem: BCCode: 9f BCP1: 00000003 BCP2: 852F46B0 BCP3: 862089E0 BCP4: 85531008 OS Version: 6_0_6002 Service Pack: 2_0 product: 768_1 files that help describe the problem: C:\Windows\Minidump\Mini111211-02.dmp C:\Users\EMMANUEL C\AppData\Local\Temp\WER-36555854-0.sysdata.xml C:\Users\EMMANUEL C\AppData\Local\Temp\WERBC76.tmp.version. How can I fix this annoying problem

    Hello

    ·         You did changes to the computer very recently before that this problem occurred?

    Try the steps in the following methods and check the status of the issue.

    Method 1:

    Blue screen errors can be caused by either a software or hardware problem. This article contains steps that you can take to try to resolve the problems of software only. If you can't solve the problem by following these steps, you may experience a hardware problem. In this case, you must contact your computer manufacturer or a computer hardware technician for help with hardware issues.

    How to fix bluescreen (STOP) errors that cause Windows Vista to shut down or restart unexpectedly

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

     

    Method 2:

    Follow the form of measures troubleshooting article and check if that helps.

    "Stop 0x9F" error or "Stop 0xFE" on a Windows Vista-based or Windows 7 computer that uses certain USB AMD EHCI host controllers.

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

  • How can I close on an application?

    I plugged an external hard drive to my new computer Windows 8 and playing an audio file, which opens the MUSIC app.  But now I want to disconnect the external computer hard drive, so I STOPPED the music (there is no STOP) and got down to 'probably delete the material and the media '.  Well, it won't let me not disconnect the external hard drive because it says that the device is in use.  There is no 'X' in the upper corner of the application to close them or end them or whatever it is and the ESC key does not work either.

    So, HOW can I close an app?  Especially one that is accessing an external HD media because there is no way to disconnect the HD safely while the application is still running.

    Thank you

    Common problem.

    You are dragging the top screen, then wear at bottom.

    Almost same problem with this thread

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-Winapps/how-to-close-a-PDF-file-in-Windows-8/45f33c40-972c-492e-AAE6-71ae87a6b3f2

  • How can I close the preview in the Adobe Viewer when the LINK on my eMag ist fullscreen? He'll still go to URL and I can not open the preview.

    How can I close the preview in the Adobe Viewer when the LINK on my eMag ist fullscreen? He'll still go to URL and I can not open the preview.

    You must change your page design if the link does not occupy the full screen of your content.

    Neil

  • How can I close a tab that has locked up, rather than farm the whole browser to be insensitive?

    I have a bad habit of having several tabs open. If I click on a link that translates the whole browser becomes unresponsive, how do I close the tab offending rather than having to close the entire browser and losing all my tabs?

    It is not a bad habit, it's normal.

    Unfortunately, there is currently no way to 'kill' a single tab without picking up Firefox.

    A few times a week I get "not responding" when I exceed the amount of memory Firefox can use. Usually about 60-90 seconds, I can close Firefox by using the menu, either:

    • "3-bar" menu button > button "power".
    • (menu bar) File > Exit
    • These same keys in order:Alt f x

    Freezes caused by other reasons could not out, in which case you get stuck. Prevention is the best cure.

    This support article covers some common reasons for freezes: Firefox crashes or does not - how to fix.

    Since the Flash plugin can also cause this problem and it is used everywhere around the web, I suggest the following to minimize potential problems with Flash in your troubleshooting:

    (1) to avoid unnecessary pain on the sites where the Flash is not really essential, try to set the Flash on Click-to-Play (Ask 'activation'). This will delay the Flash start on a page, until you approve.

    To set 'Ask to activate', open the page modules using either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click on Plugins. Search 'Shockwave Flash' and always change 'enable' to 'ask to activate '.

    With this setting, when you visit a site that wants to use the Flash, you should see a notification icon in the address bar and usually (but not always) one of the following values: a link in a gray rectangle dark in the page or an information bar sliding between the toolbar and in the page area.

    The plugin notification in the address bar icon usually resembles a little Lego block, dark gray. (If it is red, Flash must update.)

    The delay in the activation of Flash can help distinguish between the problems caused on the initial page load, put in folds and script activation vs Flash/loading bar.

    If you see a good reason to use Flash, and the site looks trustworthy, you can go ahead and click on the notification icon in the address bar to allow Flash. You can trust the site for the time being or permanently.

    But some pages use Flash only for tracking or play ads, so if you do not see an immediate need for Flash, feel free to ignore the notification! He will just stand here in case you want to use it later.

    (2) a common cause of errors in script does not work in Windows Vista and later is the feature of mode of the Flash player plugin. This feature has the security benefits, but it seems to have serious compatibility problems on some systems. You can disable it using the page modules. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click on Plugins. On the right side, find 'Shockwave Flash' and click on the link for more. Then uncheck the box for "Enable Adobe Flash protected mode" and try it for a day to see if that helps you.

  • How can I close my account in Mozilla Thunderbird.

    How can I close my account in Mozilla Thunderbird.

    It's hard to do. There is no such thing as a Thunderbird account.
    E-mail accounts are established with the e-mail providers. You would close your account with your provider.
    If you ask how do I remove an account from the Thunderbird software on your computer, you go to the menu bar and select the tools-account settings
    Select the account to be deleted.
    Actions / delete account

    No menu bar? Press the ALT key.

    Before deleting an account of Thunderbird you must move all the messages you want to keep off that records of accounts and in a folder under local folders. Messages not moved to a local folder will disappear with the account when it is deleted.

  • How is - a close all tabs?

    How is - a close all tabs for Thunderbird?

    I move an email to a folder, and for some reason any Thunderbird open all my emails and put them in tabs. I tried all the menu items and could find no way to close all the tabs at once. Also, I searched all the keyboard shortcuts and couldn't find anything to close all the tabs at once. It opened hundreds of emails and put them into tabs just trying to make a move. Thank you.

    Right-click and choose close other tabs.

  • How to set the time that my screen stays on?

    How to set the time that my screen lights up.  I have an iPod Touch 6?

    Settings > general > auto-lock

  • I accidentally click to view full screen on Firefox and now I can't cancel it. My toolbar, bookmarks, etc. is not visible. While the browser opens, the bar appears but then pops up where it is not reachable. How can I disable the mode full screen?

    To view full screen on Firefox, I accidentally clicked and now I can't cancel it. My toolbar, bookmarks, etc. is not visible. While the browser opens, the bar appears but then pops up where it is not reachable. How can I disable the mode full-screen without access to display options?

    The F11 key

  • How can I remove icons of the screen of high office

    How can I remove icons from desktop screen?

    These icons represent files stored in your desktop folder. If you move these files to other folders, or delete these files, icons no longer appear on your desktop.

Maybe you are looking for

  • After upgrade the iOS 10, phone thinks it is in mode

    6 s upgraded to iOS 10. Now I can't change paper painted. notice on screen says phone is in low power mode. It is fully charged. Tried to empty < 20% battery, and then recharge. No difference. What gives? Thank you.

  • Problems with the feature 'Parked' (iOS 10 cards)

    I have upgraded to iOS 10 on my iPhone 5 yesterday. I can't get the car parked cards function to work. I activated the following: -All maps Apple Notification options -Location services of maps (when using). 'Always', is not available as an option. -

  • Restore Safari bookmarks without time-Machine?

    Hello, all the Out of nowhere, one of my main folders Safari bookmarks disappeared. I'm a fairly knowledgeable Mac user and have no idea how they were deleted. I do usually external manual backups readers when I did some import an audio works and not

  • Apple ios 9 cards

    I can't delete the locations in "recent" on the Apple on my iphone 6 s cards, as there is nothing to type that States remove?

  • Problem with image extract the content and the tile at the same time show on ListField

    My application is Application News get JSON webservice to appear on ListField. On each line in the list, it will show you the image thumbnail, title and Teaser as below. _______________________________________ |                |