SystemListener2 never invoked in the present case.

here is my code. Is there any suggestion? Thanks,


import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;

/**
 *
 */
public class DeleteHandle extends UiApplication implements SystemListener2{
    public static void main(String args[]){
        UiApplication app = new DeleteHandle();
        app.enterEventDispatcher();
    }
    DeleteHandle() {
        Application.getApplication().addSystemListener(this);
        pushScreen(new AScreen());
    }

    public void batteryGood() {}
    public void batteryLow() {}
    public void batteryStatusChange(int status) {}
    public void powerOff() {
        System.out.println("powerOff!");
        Dialog.alert("powerOff!");
    }
    public void powerUp() {}

    public void backlightStateChange(boolean on) {}
    public void cradleMismatch(boolean mismatch) {}
    public void fastReset() {
        System.out.println("fastReset");
        int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
        if(handle!=0){
            if(CodeModuleManager.getModuleFlags(handle)==CodeModuleManager.MODULE_FLAG_DELETE)
                Dialog.alert("Module is being deleted!");
        }
        Dialog.alert("fastReset");

    }
    public void powerOffRequested(int reason) {
        System.out.println("powerOffRequested");
        int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
        if(handle!=0){
            if(CodeModuleManager.getModuleFlags(handle)==CodeModuleManager.MODULE_FLAG_DELETE)
                Dialog.alert("Module is being deleted!");
        }
        Dialog.alert("PowerOff");
    }
    public void usbConnectionStateChange(int state)  {}

    class AScreen extends MainScreen
    {
        public AScreen()
        {
            super();
            add(new ButtonField("delete"){
                public boolean trackwheelClick(int status,int time){
                    deleteModule();
                    return true;
                }
            });
        }
    }
    private void deleteModule()
    {
        int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
        if(handle!=0){
            CodeModuleManager.deleteModuleEx(handle,true);
            CodeModuleManager.promptForResetIfRequired();
        }
    }
}

Power off or fast reset is not the same as cold-reset/reboot. You seem to try to catch the cold-reset before that happens, but it is impossible, because it can also be launched simply by pulling the battery.

Tags: BlackBerry Developers

Similar Questions

  • I am but the Australia trip to the United Kingdom at the moment. I am trying to join the present case to pay $29 a month for creative cloud .99AUD, however I keep getting diverted to the site of the United Kingdom where they want me to pay £26,68 per mont

    I am Australian but travel to the United Kingdom at the moment. I am trying to join the present case to pay $29 a month for creative cloud .99AUD, however I keep is diverted to the site of the United Kingdom where they want me to pay £26,68 per month for the same offer. I won't be in Australia in time to get the special offer. I tried to change the region, but also in making sure that my ID apple is always set to the Australia. How can I take advantage of this adobe Australia treat and pay in AUD by using my Australian credit card?

    Hello

    Please try it on another browser.

    Otherwise, you can contact Adobe sales to place the order.

    Contact us | Adobe

    Kind regards

    Sheena

  • Hi, my problem is my restore points went on my pc, the error message says I have to contact the administrator of my domain, I am the administrator, but I have never heard of the area?, how get to this point and restart my restore .__thanx function.

    How do the domain administrator.

    Hi Ianstockton,

    Thank you for posting. You can see if your computer is on a domain by following these steps.

    1. click on 'start '.
    2. navigate to and right-click "my computer".
    3. Select Properties
    4. in the computer properties window, select 'computer name '.
    5. in the present case search by full computer name and see and he says Workgroup or domain anywhere around there.

    Let me know if you have any questions.

    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Option NEVER ARBITRATE for the same memory in both cases on FPGA in SCTL

    Hello

    I write code on FPGA and I wonder one thing. Maybe someone knows the answer:

    (Example attached img) situation: I have a simple matter SCTL structure. If TRUE, I read elements of memory. In case of FALSE I read memory items even, too. There is only one exit from the structure of the case. Memory never arbitrate read option so I can compile the code.

    Question: As on FPGA, runs the two cases, both memory try to retrieve data from the resource and give some output. In such a situation, it is good to put two instances of memory in separate windows in flat sequence structure so there is no danger (remember: never arbitrate option). So do the correct data when switching between cases? Or maybe, because of some risks, it is possible that I get incorrect data?

    Thank you

    The option never compromissory clause was designed specifically for drawings and models that use the template that you show here where there are multiple calls to the same method on the same resource , but where the code is written for any of the two appeals will be active at the same time. The implementation of material generated by the compiler is simplified to not wait as an active call which uses less resources. Only a single call comes at a time, inactive calls will not suffer from which affect the ongoing call.

    That said, and as others have mentioned, for this particular simple example, pulling on the appeal of the case the structure is certainly a better option. But there are many cases where it might not be a viable option as in the example you gave where the initialization of the resource should be in a different location logically.

  • not the case in the present site gives a phone number to explain my contract, I can move from one computer to another? How can I set up for printing to Adobe

    Not the case in the present site gives a phone number to explain my contract, I can move from one computer to another?

    How can I set up for printing to Adobe

    So far, it is not necessary for a person no-tech.

    If you have a normal single-user license or subscription, you are allowed to have two active facilities as long as you use only one of them for the software at the same time.  You can disable and re-enable them if necessary to install on another machine.

  • By the way the presentation Variable in the Case of the ReportColumn statement

    Hi all
    I have I need to pass the presentation column that contains the date value in the column of the report which is to be set to zero in this requirement.

    That is to say the case statement is like that

    where column1 is null then 'variable presentation"is the value of the column.

    someone you will suggest how to pass the variable to the presentation to the column of the report.

    Thank you
    Yogi.

    Check the data type of the column 'time '. ' ' count of the parent.
    the properties of column ROM-> data format
    I guess his type of tank, if yes, then
    cases where "Time". "" parent effective ' is null then ' @{parent_effective_from}' another 'Time '. "" end of parent from to.

    If the date is set then the default
    cases where "Time". "" parent effective ' is null then @{parent_effective_from} {default} else 'Time '. "" end of parent from to.

    or else try as below
    Date ' @{parent_effective_from} {2010-01-21}'

    Published by: Srini VIEREN on 12 April 2013 13:24

    Try other options as stated above

    Published by: Srini VIEREN on 12 April 2013 13:27

    Published by: Srini VIEREN on 12 April 2013 13:33

  • Update of the presentation in response to the actions of the user

    Hello

    What is the best way to prevent the user working with a presentation for a purpose of BPM (presentation is created using a template)? For example, if I need to handle user entered data on the server side (like the search for the DB, etc.) and then display the response to the user?

    For example, the user enters a product name in a field and then click on the button "find products". If products are found, a drop down menu on the form is filled with product names, otherwise it displays a warning message (or message). All this should happen on a single form, w.o. goes to the next activity in the process.

    The issue I encountered is that search DB or server-side method (i.e. gives an error when I try to access data presentation (form)). But the updates of the presentation must take place on the client side (i.e. cannot make sense server-side).

    I guess manage is to use the link - i.e. create a 'message' attribute in the BPM object, bind it to a form field, and then updating it in method on the server side. I wonder if there is a more elegant approach.

    Hi Nick,

    Here are a few things that I hope might help. Know that you already know most of this.

    (1) add a new Boolean attribute in your BPM object called "productsFound". This attribute is never placed on a presentation. It is just a flag that you are using a few steps down (steps 1 c and 3A), to indicate that the drop-down list dropdown has values or it has no values.

    (2) for the drop-down list drop-down list:

    (a) create a new method that has your SQL and change two of its properties in the tab "Properties". First mark as a "method on the server side ' and the second change its Type property 'back' to be a 'String []' (string array unless you try to fill your drop-down list of the combo with an array of another primitive variable of type)

    (b) if within your SQL in the method, you create the array of strings in a variable called "myListOfStuffForTheComboDropdown" then your last line of logic of this method must be:

    return myListOfStuffForTheComboDropdown
    

    (c) at the top of this method, set the attribute that you created in the first step ("productsFound") to false. If the SQL code detects one or more lines, then make sure that you set this to true.

    (d) for this example, I'll assume the name of the attribute is "productName". Under "Valid" click the option box 'dynamic method. Double-click the attribute inside your object of BPM. In the drop-down list below this option button, click the name of the method that you just created.

    (e) place the attribute "productName" as a drop-down list of combo on your presentation.

    (3) to obtain the value entered to create the drop-down list of the combo is filled:

    (a) in your thread, you said you want to have the user to enter a product name in an entrable field. Create a new method in your BPM object called "refreshProducts". This is a logic of sample that you can consider using:

    // this assumes that the name of the attribute is productName
    // please leave in the double quotes in the logic below.  If you remove
    // them you will not get a syntax error, but your logic will not work
    refreshValidValues("productName")
    
    // check the flag to see if any products were populated in the combo
    if !productsFound then
        // show a warning to the end user that no products were found
        showWarning("No products were found")
    end
    

    (4) you can certainly use your idea of having the "Find products" button You can also consider using just 'Invoke the on change' field entrable property to invoke the method you created in 3A (click the field in the presentation and then click the property property of the Panel "On change invoke"). Whatever it is, you have to either the "on change systematically" or the button to call the method that you created in Step 3a above.

    Hope this helps,
    Dan

  • Can I have several structures with the same case of event event?

    Hello

    I do an application which reproduces the front of the power supply HP6675A. To do this, I did a machine to States with different States

    (initialize, measures, voltage, current, ocp, ov, store, recall, etc.). In each State, should have a structure of the event that attracts the events of the buttons, as for example: If the current state is the voltage mode and the current button is pressed the next State will be the current mode. For this purpose in each State of the state machine should be the same structure of event with the same events.

    My problem is that the Vi does not work properly when I have several structures with the same case of event event. There are some possibly to do and how? Or is impossible to have several events? I read a few posts, but I can't find solutions.

    Any help is appreciated.

    Thank you very much.

    In general, you should have 1 structure of the event in your VI.  In your state machine, the structure of the event should be in "pending" status  So you will probably start in the State of the initialization and then spend idling.  Then, the user presses the present button.  If your state machine should then, go to the current state and then return to Idle.

  • That made the presentation icon surface RT Lync?

    When I'm in a meeting, the app bar downstairs has an icon of the presentation on the left, but it is grayed out.  What is this icon that is supposed to do and why is it grayed out?

    > will invoke the Lync Web App...

    Hmmm. not sure it works with Windows RT - why? Well, I think the Lync Web App using Silverlight, which is not supported by Windows RT. Maybe this help content is not specific to the ARM of Lync version? I'm not sure. Ask your technician COMPUTER what he thinks.

    Kate

  • Can I use the session with the presentation variable variable

    Hello

    I'm using a method join the variable session or repository with the presentation variable.

    I created a variable called 'VarPres' in obiee presentation I created a session with a new block of initialization variable and I made this request

    "{Select fullName from employees where idEmp=@{VarPres}.

    but when I called the session variable in obiee I got this error

    The session variable, NQ_SESSION. S_OBJ, has no definition of value

    Hello

    Does not allow a presentation in an init block variable, simply because there is no variable presentation.

    In general what you try to do probably will never work because of "timing" and is as a session variable.

    A session variable is set once per session, for once he put no exchange of value as the init block is not executed again. So, because of this you already can imagine that there is a problem in your logic, if you want to use a value set by the user in the front end to set the value of a session variable.

  • lost my series for adobe photoshop elements 13. I was a fool and I threw away the box and the cd case, thinking that I would not need for my new computer. Is it possible that I can get my return series so I can install the program?

    I lost my serial number for my copy of adobe photoshop elements 13. I was a fool and I threw away the box and the cd case, thinking I wouldn't need never the number. Is it possible that I can retrieve my serial number or maybe get a new?

    If you have registered the software when you installed it first, then you might find the serial number in your Adobe account online.

  • I've updated Adobe Flash to 15.0.0152 via the system of preferences update in the Flash icon. But no DMG file has been downloaded. This never happened in the past. Why not?

    I've updated Adobe Flash to 15.0.0152 via the system of preferences update in the Flash icon. But no DMG file has been downloaded. This never happened in the past... Why not?

    Since your any question related to an external site and does not clearly represent the destination of the link, I have the irreversible.

    For completeness, here is the link to zero Google announcement that you referenced.

    Google online security blog: project announcing zero

    In case you weren't aware, our engineering organization works closely with zero Google and many other partners in industry and universities to make sure that we are adapting to the latest threats in the two emerging research and in the real world and the security of end users is of paramount concern.

    To answer your specific questions, when you update for Flash Player native to the Panel, we provide a streamlined workflow that downloads the installer to a temporary directory, run it and finally deletes it at the end.

    If you are not comfortable with this mechanism and want more visibility and control over the installation process, you can always download the installer directly from http://get.adobe.com/flashplayer and install manually.

  • JavaScript never invoked in jsff

    Hello

    the use case is jsff, in the column of the table row when the user presses the ENTER key, I need to call some methods subsequently (jdev 11.1.2.3)
    for some reason, I don't see the javascript code that is called.
    I use af:clientListener, af:serverListener pair.
    in fact, the example is represented by Timo Hahn in his blog
    I try to reapply in the page fragment, which contains no document tag...
    Here's what I tried to do and he has never helped...
    Please indicate how to call js in the page fragment
    I considered the blog of Frank as well, but this does not work in my case...
    https://blogs.Oracle.com/jdevotnharvest/entry/gotcha_when_using_javascript_in

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < jsp:root xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1".
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich".
    xmlns:trh = "http://myfaces.apache.org/trinidad/html".
    xmlns:f = "http://java.sun.com/jsf/core" >

    < af:panelGroupLayout id = "pgl4" >
    < af:panelFormLayout id = "pfl1" >
    < trh:script id = 's2' >
    function handleEnterEvent (evt) {}
    var _keyCode = evt.getKeyCode ();
    If (_keyCode == AdfKeyStroke.ENTER_KEY) {}
    model var = evt.getSource ();
    AdfCustomEvent.queue (model, "EnterEvent", (), false);
    evt. Cancel();
    //}
    }
    function handleTableDoubleClick (evt) {}
    var table = evt.getSource ();
    AdfCustomEvent.queue (table, "TableDoubleClickEvent", (), true);
    evt. Cancel();
    }
    < / trh:script >
    < af:resource type = "javascript" >
    function handleEnterEvent (evt) {}
    var _keyCode = evt.getKeyCode ();
    check to enter the key of
    If (_keyCode == AdfKeyStroke.ENTER_KEY) {}
    model var = evt.getSource ();
    AdfCustomEvent.queue (model, "EnterEvent", {fvalue:comp.getSubmittedValue ()}, false);
    evt. Cancel();
    }
    }
    < / af:resource >
    < / af:panelFormLayout >

    < af:panelBox

    < af:table value = "#{bindings." Var DcaRegisterView1.collectionModel}"="row"width ="1200 ".
    ...
    < af:column sortProperty = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.name}"blockable = 'true '.
    < af:inputDate value = "#{row.bindings.EffectiveUntil.inputValue} '"
    required = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.mandatory}.
    columns = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.displayWidth}.
    shortDesc = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.tooltip}"id ="id3">
    < f: validator binding="#{row.bindings.EffectiveUntil.validator}"/ >
    < af:convertDateTime pattern = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.format}"/ >
    < af:clientListener method = "handleEnterEvent" type = "keyPress" / >
    < af:serverListener type = "EnterEvent" method = "#{registerBean.handleEnterEvent}" / >
    < / af:inputDate >
    < / af:column >

    ... page code fragment itself
    < / af:panelBox

    The following works for me:

    The js in the page:

    
            function doSomething(event) {
                alert('Doing something');
            }
    
    

    The call of the js of an inputText within a table component:

    
                
                
              
    

    Did you check any error js with firebug - for example?

    Kind regards

    Koen Verhulst

  • 'forcing' the user for text input prior to the presentation?

    I want to "force" users to enter text in three fields of text separated on a side box before you click on a click (on the bottom of the slide) box to continue the presentation. There is no "submit" button for each of the text boxes because there are three variables separated on the page, one for each text box, and I don't want a user to click on 'send' three times, once for each text box. I only want the user to fill out all three text fields before continuing with the presentation. As it is now, with three text boxes in a slide, the user can avoid entering any text all and simply click the box click to continue.

    Is there a nice advanced for this action? JavaScript?

    Does anyone have any ideas how to do this?

    Thanking you in advance!

    Can be done with advanced actions, but first I need to know if you can force the sequence for the ETB? You do not want a "submit" button, but the entry in BER must be confirmed by the user, or by a button "submit" a shortcut key. Now you can't use the same shortcut to multiple interactive objects, so if you assign an entry as a shortcut key this is possible only for BER. My workflow, if you can force the sequence, is to put the button submit to the first TEB, made transparent and without any text inside, on top of the second TEB (the field itself), so that when the user clicks this area to the second entrance, at the same time it confirms the entry for the first TEB.

    I've been blogging about multiple submit BER with a button (just remembered it):

    Several TEB with a Submit button

    Like to check if the user has entered something in ETB, you need a tip action and a v_null variable empty user. I blogged about this kind of variable user as well (sorry for all the links, but you can find a lot more explanation here):

    Where there is no

    You can put the button next up, but leave it to trigger a tip action that checks to see if one of the ETB has value = v_null and in this case show a warning text legend. If none is set to = v_null you go to the next page

    Lilybiri

  • Can I change a speech during the presentation?

    Sorry for my English...

    at a meeting, I often have to change something in the presentation while projecting...

    Is it possible? or should I stop the projection, to modify and to revive the keynote?

    Yes its possible to change the speech while projecting, and Yes, you're out of the game mode to make the changes.

Maybe you are looking for

  • Flags of HP touchsmart 23 all in a desktop monitor has a slight tint of red on the left

    I have a HP Pavillion 23 touchsmart all-in-one desktop pc running windows 8.1. My touch screen started showing a slight red tinge on the left side of the screen. The rest of the screen normally shows. I have no idea what may be causing it. I tried to

  • Remiain data in buffer with event VISA

    Hello I'm trying to use the VISA event to read data from a serial port. I created a simple VI to test this (see attachment). 1. I initialize the port and the event 2. in a while loop: whenever I press a button 'help' of the order is sent to my Board

  • HP all-in-one ms218 pc: need a webcam software

    Hi I have a hp all-in-one pc ms 218 and my integrated webcam does not work.  I see the drivers in Device Manager, but I don't have my software.  Anyone can find it for me please?

  • I know its been discussed hundreds of times... MicroSD

    I just came back from visiting my mom and she had just bought a brand new Acer 3.0.1 running Droid tablet. She showed me all the clever features that his was and she even said that he had a MicroSD slot. Curious person I am I put my 16 GB MicroSD car

  • Windows Update not working 641 code

    I'm having a problem with the installation of windows updates. I get code 641. I tried to find solutions on the internet, but nothing has worked. I have Vista x 64 sp2 installed. I looked in the services that are running and installed windows is not