A closing screen

Hello

I expanded a class of the screen to make my own dialog box. I added a Listfield to this screen. Each row in the list contains a label and a radio button, which are drawn by a custom Manager. Radio button events are received in the class that implements FieldChangeListener. I want to be able to close the screen when an option button is selected, but I can't get a reference to the parent screen to call screen.close () as field.getScreen () in the function

   public void fieldChanged(Field field, int context)

Returns the value null all the time. What can I do to achieve what I have described above?

You can try

Screen currentScreen = UiApplication.getUiApplication().getActiveScreen();     UiApplication.getUiApplication().popScreen(currentScreen);

or

UiApplication.getUiApplication().popScreen(YourClassName.this);

Tags: BlackBerry Developers

Similar Questions

  • Will not be closed, just crashes on closing screen Pavilion dv7 notebook

    Hello

    IV ' e had this laptop for a month now and have recently 2 concerns. A being, it will not always be closed, it crashes just on the closing screen, the only way is to do a hard closed down. The second is that it freezes when I'm in Photoshop Elements 9 in the Organizer. The program does not only. Any ideas anyone, would like to know

    solved the problem myself now, after endless tinkerin' and factory resets.

    Go to the website of HPs, find the most recent update of the BIOS and install it. Worked for me

  • Global closing screen problem

    Hey,.

    My app sends a global event to trigger a global screen (pushed with invokeLater).

    I have 2 problems:

    1. the overall form is closed
    2. A screen of Dialog.inform

    More details:

    1. When I close the app with my button 'Cancel' or by the method close() disappears from the screen and then appears again
    2. When I am pressing on the button 'Add' he runs the addContact() method and adds the touch, even if she never shows the Dialog.inform (calling + "is now a contact")
      It is also close to the global screen and shows once again that when I am using the Cancel button...

    Here is my code:

     

    public class AddToContactsScreen extends MainScreen implements FieldChangeListener
    {
        private final int LBL_COLOR = Color.LIGHTSKYBLUE;
        private final int BG_COLOR = Color.BLACK;
        Caller caller;
    
        VerticalFieldManager vfm;
    
        /**
         *
         */
        public AddToContactsScreen( Caller caller )
        {
            super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR);
    
            setBackground(BackgroundFactory.createSolidTransparentBackground(BG_COLOR, 200));
            this.caller = new Caller(caller);
            initFields();
        }
    
        private void initFields()
        {
            VerticalFieldManager vfmCentre = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH);
    
            String lblTxt = "Add " + caller + " to your contacts?"; 
    
            LabelField lbl = new LabelField( lblTxt , LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER )
            {
                public void paint(Graphics g)
                {
                    g.setColor( LBL_COLOR );
                    super.paint(g);
                }
            };
            lbl.setFont( Font.getDefault().derive(Font.BOLD, 30) );
            ButtonField addBtn = new ButtonField("Add", ButtonField.FIELD_HCENTER);
            ButtonField cancelBtn = new ButtonField("Cancel", ButtonField.FIELD_HCENTER);
    
            /* Add button's listeners */
            addBtn.setCookie( new String("addBtn") );
            cancelBtn.setCookie( new String("cancelBtn") );
            addBtn.setChangeListener(this);
            cancelBtn.setChangeListener(this);
            /* -- */
    
            vfmCentre.add(lbl);
            vfmCentre.add(addBtn);
            vfmCentre.add(cancelBtn);
    
            this.add(vfmCentre);
        }
    
        protected void paint(Graphics graphics)
        {
            super.subpaint(graphics);
        }
    
        public void fieldChanged(Field field, int context)
        {
            if( field.getCookie().equals("addBtn") )
            {
                addContact();
            }
            else if( field.getCookie().equals("cancelBtn") )
            {
                close();
            }
        }
    
        private void addContact()
        {
            try
            {
                BlackBerryContactList contactList = (BlackBerryContactList)
                PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.WRITE_ONLY);
    
                BlackBerryContact contact = (BlackBerryContact) contactList.createContact();
    
                String[] name = new String[ contactList.stringArraySize( BlackBerryContact.NAME ) ];
                name[BlackBerryContact.NAME_GIVEN] = caller.getFirstName();
                name[BlackBerryContact.NAME_FAMILY] = caller.getLastName();
                contact.addStringArray(BlackBerryContact.NAME, BlackBerryContact.ATTR_NONE, name);
                contact.addString(BlackBerryContact.TEL, BlackBerryContact.ATTR_WORK, caller.getNumber() );
    
                contact.commit();
            }
            catch (PIMException e)
            {
                e.printStackTrace();
            }
    
            Dialog.inform( caller + " is now a contact" );
            close();
        }  
    
        public boolean onClose()
        {
            UiApplication.getUiApplication().popScreen( getScreen() );
            return true;
        }
    }
    

    Any ideas?

    Thank you

    Rotem

    Check that if you only add the earpiece of the phone once (and unregister it properly on shutdown), it is possible that the former listeners remain.

    If this does not help, you will need to check for the event must be unique, for example by ignoring an event with the same data.

  • How to listen to a closed screen event

    Hi, do achieve the example that I gave to 2 screens, I would class to know when App screen1 is closed and act at this time, how can I do this?

    import net.rim.device.api.ui.UiApplication;
    
    public class App extends UiApplication{
    
        public static void main(String[] args)    {        App  app = new App();        app.enterEventDispatcher();    }    public App()    {        pushScreen(new Screen1());        pushScreen (new Screen2());    }}
    

    Screen1.Java:

    import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.MainScreen;
    
    final class Screen1 extends MainScreen{
    
        public Screen1()    {        super();         setTitle(new LabelField("Screen1"));    }    public boolean onClose()    {     setDirty(false);      return super.onClose();    }
    
    }
    

    Screen2.Java:

    import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.MainScreen;
    
    final class Screen2 extends MainScreen{
    
        public Screen2()    {        super();         setTitle(new LabelField("Screen2"));    }    public boolean onClose()    {        setDirty(false);      return super.onClose();    }}
    

    Declare an interface:

    public interface ScreenClosedListener {
    
       public void notifyScreenClosed(MainScreen screen);
    
    }
    

    Add features to the Screen1 class.

    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    
    final class Screen1 extends MainScreen {
    
        private ScreenClosedListener listener;
    
        public Screen1(ScreenClosedListener listener) {
            super();
            setTitle(new LabelField("Screen1"));
            this.listener = listener;
        }
    
        protected void onUndisplay() {       listener.notifyScreenClosed(this);    } 
    
        protected boolean onSavePrompt() {
          // if you want to always close the screen
          // without questions just return true
          // there is no need in setDirty(false)
          // in onClose() method
    
          return true;
        }
    }
    

    Add features to the App class, make the screen closed event listener

    import net.rim.device.api.ui.UiApplication;
    
    public class App extends UiApplication implements ScreenClosedListener {
           // compose Screen1 instance and pass to the constructor    // the reference to the App clas    // which is ScreenClosedListener implementation     private Screen1 screen1Instance = new Screen1(this); 
    
        public static void main(String[] args) {
            App  app = new App();
            app.enterEventDispatcher();
        }
    
        public App() {        pushScreen(screen1Instance);
            pushScreen (new Screen2());
        }
    
       public void notifyScreenClosed(MainScreen screen) {
    
             // check the event source object         if (screen==screen1Instance) {     // act accordingly here     }   }
    
    }
    

    }

  • Remove cover from closing/screen on my Satellite 1110-Z14

    My Toshiba Satellite 1110 - portable Z14 has developed a fault which means he keeps
    cut to leave a blank screen. If I open and close quickly, he returns to everything and then goes again. It is not cost-effective to repair it and I connected another monitor and now I'm fine. I would remove the lid/screen and found it difficult.

    I have removed the two screws but still could not remove it, the 2 hinges do not seem to move - someone ' can someone help?

    Hello

    To remove all of the screen, follow the steps

    1. remove the two screws on the back panel of the cover of the band
    2. open the display Panel completely so that it is lying flat
    3. remove the cover of the band by lifting the left edge
    4. remove the screws fixing the whole of the display:
    -Two screws that attach the hinges
    -A support for right hinge mounting screw
    -A screw of the left hinge support
    -A screw of the display cable
    5. unplug the display cable by pulling on the attached cord.
    6. open the faceplate so that it is perpendicular to the computer and lift it.

    Good luck and be careful.

  • Two screens DVI on Port Replicator II with Tecra S10-160

    Hello to all 2!

    Right now I'm working with two external 19 "TFT screens connected to the Port Replicator II (Tecra S10-160 inside with closed screen). A display is connected to the DVI port available, the other is connected on the available on the Port Replicator II VGA port.
    A single display (DVI) is used as the main office, the other (VGA) is used as office improved (both show different content).

    My problem is the poor quality of the VGA signal and the problem, my two new screens are only supported DVI.

    Is it possible to connect two DVI displays to the DVI - D Port Replicator II? I already checked several DVI-Y-cables, but I'm still looking for a solution connect two displays via DVI with the function to get two split screens and not the same content on both screens.

    Hope you got my point and have information or ideas for products for me.
    Thanks in advance.

    Hello

    Have you already tested a VGA to DVI? So, you can use the VGA connector on the port replicator and your monitor's DVI port.

    I mean such a cable like this

    Such an adapter you can always use the function to get two split screens and not the same content on both screens. :)

  • Spectrum of HP 360 x c: keyboard is locked when the screen is triggered, the spectrum X 360

    High,

    I have a recently purchased HP spectrum x 360 C, Intel Core i7-5500U CPU @ 2.40 GHz, 8 GB RAM, Intel(r) HD Graphics 5500, 512 GB SSD (a few weeks ago).

    When I rais/open position closed screen sometimes the keyboard could not serve (nothing happens when you press the keys). I then down/close the screen or turn around the screen to almost "shelf position" in order to activate the keyboard.

    As noted that this happens only sometimes, once per day, twice a day or copuple of times in a week.

    How can I send the computer for hardware repair or or is it a driver/software problem?

    Grateful for a response!

    @Henclar,

    Hello and thanks for the display on the HP support forum.  From what you explain does not sound like a software problem.  You can try to do a full system recovery, return to the original setting of the box to see if the problem is still there to start.

    HP computers - performing a recovery of HP (Windows 8) system

    Now, if it was a software problem, it would be constant, this looks like a connection which is note makes 100% of the time and would require a repair.  If the recovery does not work.

    Please contact our technical support at the 800-474-6836. If you do not live in the United States / Canada region, please click the link below to get help from your region number.

    http://WWW8.HP.com/us/en/contact-HP/WW-phone-assist.html

    Let me know how things are going.

    Thanks again for posting and have the great day.

  • T41 screen goes suddenly blank - possible overheating?

    Having an intermittent problem with my T41 and I was wondering if anyone has an idea as to the cause.

    Most of the time, I use it in a docking station. Sometimes, after I used it for a while, the screen suddenly becomes empty. There are hard disk activity, as the light continues to blink, but the screen remains blank, no matter what I do. The only way out is to do a hard reboot via the button power and, when I turn it back on again, the screen comes back, but usually some of the desktop icons have changed places. Once, the screen resolution has also been reduced to 800 x 600, and I had to reset to 1024 x 768.

    I noticed recently that when he does that little thing of closing screen, the fan doesn't seem to work, and if I delete the computer from the docking station, it seems a little warm down. Then when I restart the computer, the fan comes immediately and seems to be pushing a lot of heat on the vent on the side.

    If anyone knows if there is a problem of overheating caused by the fan does not kick when it should or could there be another cause? One thing that confused me, it's that, according to the fault of Windows reporting system, it says it's a fault of video driver and I should update the driver. So can someone tell me what the problem really is?

    Edit:

    I was able to find one of the manuals in PDF format, and it seems that the computer is suddenly in hibernation due to overheating of the CPU. Unfortunately, that's all it says and does not give advice on how to solve the problem. Does this sound like a correct diagnosis?

    A "video driver" fault on these machines is usually a sign of a GPU unsoldered, which is an extremely common problem on T4x units.

    Install the ThinkPad fan control to monitor the time, but I think you're in for a replacement motherboard sooner rather than later. Your saving grace is that the best reballing shop when it comes to ThinkPads is located in the United Kingdom.

    http://www.staff.uni-Marburg.de/~schmitzr/donate.html

    Good luck.

  • Keeps going back to the screen "computer is not stopped correctly?

    A friend's computer won't start. When you press the power button, it loads well, until the screen where you can choose to start Windows normally, in SafeMode etc due to an improper shutdown. When you select one of the options, it is moving towards the following splash screen, but then instantly returns to the improper closing screen, when you select "normal" or "safe mode" etc. and does all over again, like a loop.

    It's Vista or 7, not sure which at the moment. No idea why?

    Hello

    Try a startup repair to see if the problem that will be solved.

    Here is the guide to Service Options while using a Microsoft Vista DVD (not the manufacturer's recovery disc).

    If a friend or a work acquantance of yours has one, you can borrow and use it for repairs.

    http://www.bleepingcomputer.com/tutorials/repair-Windows-with-Windows-Startup-Repair/

    Table of contents

    1. Overview of Windows Vista repair options
    2. How to perform an automatic repair of Windows Vista using Startup Repair
    3. Advanced Tools Overview
    4. Conclusion

    If you do not or can not borrow a Microsoft DVD there is a download of a file ISO of Vista Startup Repair available that you can put on a Bootable floppy to make the above startup repair and that the method is recommended by a large number of posters in these Forums.

    Unfortunately, you have to buy it.

    Here is a link to it:

    http://NeoSmart.net/blog/2011/Windows-Recovery-discs-updated-reinstated/

    See you soon.

  • Windows 7 stuck at closing

    Hello

    I'll be honest, I never really stopped my pc. However, when I did a few months ago I noticed that the PC would be stuck to the closing screen. The loadong symbol freezes and all stops activity drive HARD but the PC does not.

    I tried several things to solve this problem, but not had any luck.

    1 safe mode network and standard safe mode. Same question.

    2. clean the boot (using msconfig to disable startup items and services)

    3 deleted all the Event Viewer logs and restart. Only 2 logs to stop

    1. Office Service 9009

    2 order the user profile service

    Is there anything else I can try? This could be a hardware problem?

    Update 1

    After looking around other forums, it has been recommended to try "sfc/scannow". Ran, but no error was returned.

    OK, I managed to fix this by chance.

    I noticed recently that my mouse Steelseries Sensei acted up, for example by clicking mouse4 and mouse5 in one browse ended up going forward or backwards twice.

    I tried to use the firmware update to reinstall my drivers but it kept locking up my machine. I tried to uninstall the software completely in Mode without failure, but even once it locked up my machine. After the reboot once more and uninstall mode safe it actually uninstalled everything.

    Since the Sensei drivers uninstall my machine restarts fine. Complete coincidence, but is now resolved :)

  • How Lock/disable fields during the loading screen?

    Hello

    I'm looking to 'lock' or 'disable' everything on the screen whenever I call setStatus(). The concept behind this is I want to use setStatus() to tell the user when loading the screen is. While it is loading, I don't want the user to be able to do anything. Is there a specific way to do this?

    Thank you!

    crush the onClose returns true, this will disable the closing screen. no need for the navigationclick or the keychar then.

  • Backlight blackBerry black when slide open screen Smartphones!

    Hello

    I've had my Blackberry Torch for all 10months now and last week I think I have had wet slightly after that I tried to answer the phone when out of the tub. Since then, it has been authorized, but last night when I slid open the everything went black. As soon as I drag the closed screen works again! This means that I can use the phone as a touchscreen phone when it is down (which is not good for me I still have the text using the keyboard when it is slid open).

    I called o2 and they said before he send to repair I should try all the latest BB software, upgrade like this might it solve. I've never had any update, but it will really be able to fix my screen? Is there another way I can try to fix me phone? I tried it reboot several times and take out the battery and it leaving out overnight to dry etc..

    Any help would be much appreciated. Thank you all!

    Hello

    That might actually solve your problem, if it is a software problem, then it's definitely worth a try. If this does not work you can also try to jump your phone in a bowl of rice (old tale marry!), it sounds ridiculous, but it has been known to draw moisture out of electronics and I used it to fix my phone after a fall in the sink!

    If none of these options works consider get your phone repaired or claiming insurance if you have it.

    Hope this helps

  • On occasion while gaming, I get a black screen with "Cable no." WARNING.

    Possible USB problems

    I'm retired and a player.  I play every day.  In may, I started a new game (Diablo 3).  At that time, I also installed a new mouse software.  This is a Logitech M310 wireless and requires a Nano-receiver being connected on a USB port 24/7.

    As I started playing back in may, every 7-10 days while I'm in the game, I experience what I call a black screen of death (as the BSOD).  A moment that I'm in the game, then in the second place, my screen goes black and I see the warning "no cable".  I can still hear the game sounds and music.  No matter what I try, I can't restore the connection of monitor.  CTRL-ALT-DEL to bring up the master may work, but not on the screen.  The only way is down/cold power system restart.  I reboot in safe mode and then restart in normal mode.

    There is a problem in Diablo 3 (D3), it causes 'stretch' or 'video' stuttering.  There is a program in Windows 7 called Ready Boost.  It allows you to insert a flash drive into a USB port, and prepares the drive to let the game use the extra memory of training, may reduce stuttering/stretching.

    I use program flash drive/Ready Boost for about two weeks, now with a flashdrive of 18 GB and a black LAWN known on August 1.  That day I could not recover from the accident and had to take my computer in the store, so they could repair (the computer also let me not use the monitor of my wife so I could understand what was wrong).  Their tech programs could not find no reason for accidents and also could not reproduce them.  There is little to dust in the video card, so they thought it was card gel to prevent burning (but why close the monitor and not the computer, what is true?).

    Got the computer back on August 4 and had another black TURF on Sunday 12 August, where I was able to recover and return to play my games.  Then, on Monday, August 13, there was another which I was also able to recover.  Then, on Monday night, when I turned off the computer for the day, he hung up the shutdown sequence, he showed to the closing screen but could not go beyond and trotted in.  Finally, after about 3-5 minutes, I pulled the plug to turn off it (may not have something to do with it, but seems a bit strange - never had it before).  This morning when I turned on the computer, he began immediately with the black SOD - got the standard WARNING This "wireless".  I tried what I could to recover from the accident but reboot several times (after closing) did not work.  I thought that I had to take the computer back to the store, so (while I still had the computer running and screen always telling me no. cable) I pulled out the 16 GB flash on the USB disk - and immediately, opening (after login) screen was displayed, and everything has worked fine since.

    I tried the D3 Tech and Bug Forums, and it seems that a lot of other players of similar experience black SOD while in the game.  The only thing in all of this that has something in common (on my system, I will go back and see this post in the forums for others) is the port USB/connections.  The new mouse installed in May when I started playing D3, started black SOD (BTW, never had any problems before this date) which requires the nano, the extra flash drive connector, I installed and the display on the screen when I pulled the drive from the USB port.  There is nothing else that is related to the other.  But, I know to look for the cause and deflagrates solving problems and it seems the program/USB connection is the likely suspect, so far.  I wonder if something inside the D3 runs at some point with the USB program?

    I apologize for the long post, but I'm putting everything out there so someone can recognize a problem, I'm not familiar with that.

    I have a generic computer built to my specs, by a local company, 2 years ago.  I am running Win 7 Pro, quad core, 64-bit CPU i7 860 2.8 GHz, not overclocked, 8 GB of RAM and a NVIDIA GTX 295 video card. And as I said, I've never had a problem with this computer until May this year. I have it on all day from 06:00 to 23:00 and have enough fans installed to power a helicopter, and clean the entire system (air jet) every 3-4 weeks.

    I appreciate that you could help me with this.

    Kind regards

    Johnny2

    Most of the black screen errors are related to the video card:
    -Make sure that it gets cooling (that the fan runs and it has not filled with dust/hair/etc.).
    -Make sure that the power cord is firmly in place (and that the card is in place in its housing).
    -Make sure you have the latest drivers from the website of the manufacturer of the video chipset ( http://www.nvidia.com )

    Step 2-update of all drivers on the system, then get all available Windows updates.

    An additional step - if make you it work, immediately put a system restore point.  This does not always work, but it is one of a few patches semi reliable for problems KSoD (Black Screen of Death).

    Make sure you have all the updates for the game.

    Finally, reinstall Windows if all else fails.  Get all the Windows updates available - so make sure you update the drivers from the website of the manufacturer of the device (no Web site of the manufacturer of the PC, no update of Windows with the update function of the driver in Device Manager). Then visit again and again - update Windows until no more updates to date are available.

    If problems persist, try another video card.

  • Profile on the screens non-designer fields

    • Configure Custom_Call_Profile_1 in the management of the IPK
    • Add the field to the screen Designer (set properties as mandatory/DisplayBlank) and then export to htm file
    • copy DIV section containg Custom_Call_Profile_1
    • Paste it into InCallClose.htm - reset IIS etc.

    This field displays ok, but the White option is not displayed instead, it displays not "specified".

    Is there a way to display the field with the option blank? (It displays ok when added via the designer to a call screening)

    I'm not among the references of JScript/hidden field at the top of the htm file.

    Also you can get rid of the value unspecified?

    I tried this on my test system and it works fine.

    There should be no reason why the exact html generated by the designer would not work on closing screen.

    I would recommend that you check the html code you copied and make sure it has the attributes highlighted:

    profileid iwpropmandatory = "ismMandatory" = iwpropQDprofileID "38" = "profileid" ismDisplayBlankOption = "true" ismMandatory = "true">

    (more the event onchange in the upper part)

    Note I copied the creator, and not the generated page source code.  So there is not the

    When I add this to my screen closing the White option appears and I can't submit until I choose a non-empty option.

    You can enable the view source in the designer by setting the following registry key on your client computer.

    HKEY_LOCAL_MACHINE (if Wow6432Node on 64-bit computer) \EMC\Ionix Service Manager\IN_WRAPPER

    ViewSource = 1

    Then right click on the element you want and select "View Source Element".  This will give you the source code for this article (less all events)

    Note: this registry should ONLY be set on the client computers of the developer.  It allows other options to right click that we hide for a reason & can result in strange behavior if you select (such as the back browser button)

  • Inspiron 1100 w/low black screen image

    My screen went black and keeps a low background image.  I can press func. F8 and screen will temporarily be standardize for about 10 seconds and then go black.  I can press fnc. F8 again and the same thing happens.  I probably destroyed the lcd screen allowing a problem to continue preventing the closing screen (conflict with hid wireless mouse) when it is idle, so he stayed all the time...

    What is a backlight problem that love so much to comment on here?  I'm tempted to try to replace the backlight, if that's what it is, or pick up a screen on ebay.


Maybe you are looking for