How to implement a stack of screen "single instance".

I'm looking to implement an application that accepts only a single instance of specific screens.  What is the best way to achieve this?  I have checked the documentation and can't seem to find anything that addresses this issue.

The idea is similar to a singleton pattern...

If (screen is nothing)

{

screen = new XYZScreen ();

}

return to display;

If I already pushed my XYZScreen in the stack, using the pushScreen() method, I would like to get a handle to that instance, and they have to protest against the creation of another instance and add it also.  Also the memory problem, it makes more sense for the particular project that we are working on.

I can't seem to find anything like "UiApplication.getUiApplication.getScreen ()" to get a reference to a particular screen already on the stack, or a 'Stack.moveScreenToTop () '.

Suggestions, examples or links would be appreciated.

You can use getActiveScreen() and getScreenBelow() in a loop to see if your display is already present in the stack to display.  If this is the case, then pop, and you then press it to remove it from its current position and make it visible.  If it is not on the stack, you can just push it.

It works for you?

Tags: BlackBerry Developers

Similar Questions

  • How to "turn on" an ABC agent single instance/Server?

    As a result of this thread: How to create an instance of "Agent ABC" only?

    I had many problems of implementation of the instance of 'EAC only Agent', as you can see in the previous discussions. I had all this work, but I guess I didn't understand what I ended up doing.

    The instance was restarted or recycled as part of an upgrade and now the dgraph process does not start. In fact, I don't know how to start it. I assumed, he launched the instance of control station/CEC. The EAC does not seem to run on the only case of an agent, so there is no way for all orders get sent to the EAC.

    I was working with the assumption that the only case of agent didn't need all the configurations. And I have never been documented manually start EAC on this single instance of agent.

    Am I guess just to start PlatformServices / EAC with the same command I use on the Server central/command of EAC?
    "cd $HOME/endeca/PlatformServices/6.1.3/tools/server/bin".
    ' nohup endeca_run.sh & '.

    In version 6.1.2 Platform service, you start with:

    source /home/gose/endeca/MDEX/6.2.2/mdex_setup_sh.ini
    source /home/gose/endeca/PlatformServices/workspace/setup/installer_sh.ini
    $ENDECA_ROOT/tools/server/bin/startup.sh

    Services Platform will work as a controller of ABC Application if there is the following file:

    $ENDECA_CONF/conf/Standalone/localhost/eac.xml

    If you delete this file (or if it does not exist), the installation will run as an Agent of the CAE.

  • How to return to the main screen after watching downloads?

    This such a stupid question, but I have forgotten how to return to the main screen after watching downloads.

    Close the window or tab to download (if you are using some addon) or only to change the tab:

    Downloads:

  • How to implement the reading of data from a matte file on a cRIO?

    Hi all!

    I'm still not sure, it is plausible, but I'll ask rather before you begin complicating. So far, I found no useful information on reading in the data to a device of RT from a file (type of a simulation test - data is simulated).

    I have the MatLab plugin that allows the storage of data read a MAT file, which has a number of columns that represent the different signals and lines representing the samples at a time (depending on the time of the sample - sample every time has its own line of signal data).

    I have no idea how to implement this at cRIO.

    The idea is:

    I have some algorithms running on the controller of RIO in a timed loop. As the entries of these algorithms I need to access each of the values of columns in the row, which is the time of the sample (sort of a time series - without written actual times).

    I am fairly new to RT and LV development, so any help would be appreciated.

    Thank you

    Luka

    Dear Luka!

    I think the reading of all the samples in a single channel is exactly what you need here, because reading the files may take some time and is not deterministic, so it is best to read all the data in memory (or if this is not feasible due to problems of size, fairly large pieces may be sufficient). The table read can be provided and then in the loop simulating outings, something like this:

    I used here separate channels so it's more graphic, but you can build all the channels in a 2D array and array index corresponding to the samples fom 1 who. You can also use for loops with indexing as tunnels are setup and then you won't need the index functions and the number of iterations is also set automatically, but you have to take care of synchronization settings.

    Best regards:

    Andrew Valko

    National Instruments

  • I try to combine a picture of my sister with a picture of a poem next to her. How to combine the two into a single photo?

    Paint or Windows Photo Gallery

    I try to combine a picture of my sister with a picture of a poem beside it, how to combine the two into a single photo?

    If you have the poem recorded in an image format,
    the following freeware can create a side by side
    Panorama.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Download IrfanView
    http://MajorGeeks.com/IrfanView_d4253.html
    (filename: iview433_setup.exe)
    (uncheck if you don't want Google Chrome)

    Download plug-ins too...

    IrfanView plugins
    http://MajorGeeks.com/IrfanView_PlugIns_d4908.html
    (filename: irfanview_plugins_433_setup.exe)

    When the program is installed... read more...

    Open IrfanView and go... Image / create the Image of the Panorama...
    (this will open the screen to "Create a panorama image")

    On the screen to "Create a panorama image"... left click on the add images"" button.
    (Displays the 'Open' screen. Now, drill down to the
    the folder that contains your saved Photos of veterinarians.

    Now... click left (highlighted), the two images, you want to join.
    (you can select more than one if you hold down your Ctrl key)
     
    The two images highlight... left click on the button 'open '.
    (Or... you can add the images one at a time... which is always easier)

    Now, go back to the screen "Create the panorama image.
    and the file names of the selected pictures need to be in the
    Field "Input Images.

    Now with the names of two files in 'Images of entry' field...
    You can left click on the button 'create Image '.

    (the positions left and right of these images can be swapped in)
    selection of a file name and using the "mount image" / "Move."
    Images down"buttons...)

    Now you should see a display of the combined image.
    Reach... File / save as...

    Choose a backup location / enter a file name / choose a format...
    On the left, click on the button "Save..."

  • How to implement the ScreenUiEngineAttachedListener Interface?

    How to implement the ScreenUiEngineAttachedListener Interface? It is somewhat a mystery reading through the API.

    I have a class that implements ScreenUiEngineAttachedListener:

    public class UiListener implements ScreenUiEngineAttachedListener {
      public void onScreenUiEngineAttached(Screen screen, boolean attached) {
      }
    }
    

    Then I have a class MyScreen which extends from screen and has two methods:

    public void addScreenUiEngineAttachedListener(ScreenUiEngineAttachedListener listener) {
      super.addScreenUiEngineAttachedListener(listener);
    }
    
    private void removeScreenUiEngineAttachedListener() {
    
    }
    
    • What is the correct positioning of everything?
    • Can I define an instance of UiListener and pass in the addScreenUiEngineAttachedListener?
    • How to remove UiListener in removeScreenUiEngineAttachedListener?

    You will need:

    • an instance of your UiListener - probably a static member inside your UiApplication;
    • a method that allows to retrieve the reference to this instance of UiListener;
    • a call in your constructor for the screen at addScreenUiEngineAttachedListener (yourApplication.getUiListener ()) or similar;
    • potentially a call within your onScreenUiEngineAttached (attached screen, boolean) routine, the branch (attachment is false) : screen.removeScreenUiEngineAttachedListener (this);

    However, all this is too much work for no gain. Just override protected void onUiEngineAttached (boolean attached) in your screen class and make your logic there - all members of your class are accessible and all the code is placed where it belongs.

  • How to move from PopupScreen to screen settings.

    Hi all.

    I have a MyScreen extends screen with a button to display PopupScreen. In PopupScreen, I have the list RadioButtonFields, OK and Cancel buttons. When I click the OK button, the RadioButtonField value will switch to MyScreen but now I don't know how to implement it.

    Please help me.

    Thank you

    Yes, thank you peter_strange. The problem will be resolved if we use the internal class. The MyPopupScreen is an inner class within the MyScreen.

  • I have 4 recorded images.  Each is opened in a separate tab.  How do I drag each on a single file?

    Newbie looking for help here.  I have 4 recorded images.  Each is opened in a separate tab.  How do I drag each on a single file?

    I find that the easiest way is to organize a 4up on the screen and then use the move tool to drag between windows.

    Window > arrange > 4up

  • How PC can be used with a single creative cloud subscription?

    How many PCs can use with a single creative cloud subscription? For example I currently use Lightroom on a PC at home with 2 large screens, but use a laptop or iPad when you travel. A monthly subscription covers it all 3 or do I have 3 separate subscriptions?

    Hello

    You can activate the creative cloud on 2 machines using the same license.

    Kind regards

    Sheena

  • How to make a backup of the database with RMAN Oracle Single Instance

    People,

    Hello. I use the server of Oracle 11 GR 1 material with operating system Oracle Linux 5.10 database.

    I understand how to back up the database instance in SQL Server with Windows. But do not really understand how to back up the database instance in Oracle on Linux.
    I did it cold and hot backup for the database HRCS90 instance, but both receive the same error message.


    Cold backup is below:

    SQL > startup
    ORACLE instance started.

    Total System Global Area 538677248 bytes
    Bytes of size 2146024 fixed
    528482584 variable size bytes
    4194304 buffers of data bytes
    Redo buffers 3854336 bytes
    Mounted database.
    Open database.


    SQL > shutdown immediate
    The database is closed.
    The database is dismounted.
    ORACLE instance stops.


    RMAN > backup database;

    From backup 25 November 13
    using the control file of the target instead of recovery catalog database
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of the backup command to the 25/11/2013 14:26:52
    RMAN-06171: not connected to the target database


    RMAN > backup HRCS90

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00558: error occurred during parsing of order entry
    RMAN-01009: syntax error: found 'distinctive sign': expected an of: ' archivelog, auxiliary, as, backup backupset, blocks, channel, check, copy, copies, controlfilecopy, cumulative, current, basic data, datafile, datafilecopy, device, diskratio, db_recovery_file_dest, db_file_name_convert, duration, filesperset, for, format, from, full, strength, file, incremental, keep, (, maxsetsize nochecksum, noexclude, nokeep, not, proxy, pool, re-use, recovery, section, skip). ', spfile, skip readonly, setsize, tablespace, tag to validate.
    RMAN-01008: the identifier of the AfDB was: HRCS90
    RMAN-01007: line 1 column 8 file: entry standard


    RMAN > backup database HRCS90

    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-00558: error occurred during parsing of order entry
    RMAN-01009: syntax error: found 'distinctive sign': expected an of: ' archivelog, auxiliary, backupset channel, copy, controlfilecopy, backup, common, base data, data file, datafilecopy, remove, diskratio, db_recovery_file_dest, filesperset, format, force, file, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, more reuse, recovery, section, skip, spfile, pass readonly, setsize, tablespace, tag, to).
    RMAN-01008: the identifier of the AfDB was: HRCS90
    RMAN-01007: line 1 column 17 file: entry standard

    While the instance of database HRCS90 is starting, I do hot backup by using the same commands and get the same error message with above cold backup.

    My question is:

    Can any folk tell me specific steps (order by order) to back up a single instance of the database in Oracle with RMAN?


    Thank you.

    Yes, you can restore and recover the backup, but not at the moment. You will only be able to restore and recover at the time of your backup.

    For example.

    If you take backup (mount point with no mode of journal archive) at 06:00 and your grave database crashes at 21:00, you will be able to restore and recover until 06:00. You will find all the changes made to the database between 06:00 and 21:00.

    If you want your database to recover until 9 PM or until a point in time, then you must put your database in log mode archive, and then save the archives.

  • How to implement ad hoc approaval in ES2?

    Salvation process experts,

    I am going through a single requirement where I need to implement an ad hoc approval in our process LC management service component.

    Really say that I have no idea on an Ad-hoc approval. Please let me know:

    What is ad-hoc approval?

    How to implement?

    Where we will use this and what the advantages and disadvantages of this method?

    Waiting for useful answers.

    Thank you

    Praveen

    What is ad-hoc approval?

    It is usually a process where the user can define who will be the next person in the process. In this case who will approve the request. The next approver is not set in the process, but it was decided by the final user. So they have total flexibility in terms of decide who participates in the approval procedure.

    How to implement?

    First define an area on the form for the user to specify the following in the process approver.

    Have a process with the user service and specify the initial user of a variable. This variable would get filled with the name of the approver defined by end users when they fill out the form.

    Jasmine

  • How can implement you not with Tim Capsule and AirPort their simulation on the iMac?

    Hello

    How can implement you not with Time Capsule and AirPort their simulation on the iMac?

    I don't know what you're asking.

    AirPort Extreme is a wireless router.

    A Time Capsule airport is an AirPort Extreme with a built-in hard drive for data storage.

    An iMac is a Mac computer.

    An iMac is not a wireless router, so he is unable to perform the functions of a wireless router.

  • How can I make double click to single click to open files?

    How can I make double click to single click to open files?

    See:

  • How we implemented personal signatures in Thunderbird?

    How we implemented personal signatures in Thunderbird?

    http://KB.mozillazine.org/Signatures_%28Thunderbird%29

  • How to configure firefox to run as a single instance, so that all external links open within my existing window rather than opening another window?

    How to configure firefox to run as a single instance, so that all external links open within my existing window rather than opening another window?

    Sorry, there is no setting for what is built into Firefox.

    https://addons.Mozilla.org/en-us/Firefox/addon/tab-utilities/

    In the utilities tab > Options > links there is a preference to enable single window mode.

Maybe you are looking for

  • Satellite Pro L10 SM Bus controller driver needed

    I'm missing a Base system device driver and a SM Bus Controller Driver please anyone could tell me where to find these drivers, I am running Windows XPThank you

  • I plugged my charger 6s to a third party iphone and now it is loading slow and very rapid battery loss

    I plugged it to the third-party charger it says it only is not available or not supported, but I kept it plugged, but he was in charge very slowly. The morning I olugged my original charger but it does not charge as before

  • Get the 80070026 error during the installation of Windows Vista SP2

    Everyway that I try to run my automatic updates for windows I get the error message with the error Code 80070026.  I have Vista service Pack 1.  I do not know there is an update for me who keeps my computer at risk or with this problem. I've also dis

  • Dell MD3400 + extra shelf

    Hi all We are looking to buy a MD3400 but need about 100 TB of storage so want to bolt an extra unit shelf, if anyone can confirm the extra shelf that must be specified with this? We had conflicting information according to there the MD1400 which is

  • Cannot lock the focus

    Hello I'm developing an application that uses the camera on a Torch 9810 using SDK 7.1.  I'm trying to use the EnhancedFocusControl set and lock the focus.  My code is below: public CameraImageCapture() { try { _camera = javax.microedition.media.Mana