RuntimeStore do not store?

Heya,

I am trying to add an element of 'See Contact' on-screen menu, that I managed to do this successfully, but I can't get these information from contacts back from him for any reason any. I am trying to do this by making a RuntimeStore with her. Here is the run method of the MenuItem:

public Object run(Object context) {

            if (context instanceof Contact) {
                try {
                    RuntimeStore.getRuntimeStore().put( CONTACT_DATA_ID, (Contact)context );
                } catch (IllegalArgumentException e) {
                    RuntimeStore.getRuntimeStore().replace( CONTACT_DATA_ID, (Contact)context);
                }

                Application.getApplication().requestForeground();
            }

            return null;
        }

And here's the code tries to read:

Contact contact = (Contact) RuntimeStore.getRuntimeStore().get(CONTACT_DATA_ID);

if (contact != null) {
System.out.println("Yay!");
} else {
System.out.println("This sucks...");
}

This is only an impression on the part «it sucks...» ", lol.

Any ideas on why Miss it? It is on the simulator of Blackberry 8330 using 4.5.0

I'm not sure that the context is not null, but it is certainly 100% Contact type. If I do something wrong in terms with the menu item please let me know = / for some reason System.out.println () prints in the run method, so he was making it difficult to test.

Thank you ~.

You are absolutely sure that you actually put some data in RuntimeStore.  There are a few things you say makes me very suspicious:

"I'm not sure that the context is not null, but it is certainly 100% Contact type.".  A null object will not Contact type - your test will fail.

"For some reason any does not print System.out.println () in the run method" - I did have a problem with that in the run method - maybe he never goes through these lines?

I suggest you put a few breakpoints in your run method and make sure what you actually through this code, before I looked for any other problem.

Tags: BlackBerry Developers

Similar Questions

  • Thunderbird not store my password of incoming ATT mail

    I recently signed to ATT and I have account in Thunderbird, but you bird will not store my PW, I have to type manually whenever I try to retrieve any email att.net . Gmail and Comcast EMail work as adverstised, just ATT.NET is bad conduct.

    Thanks for the guys attempt, but it seems that we all missed the most obvious solution. Simply, I deleted the email account and readded it. The process is painless and in the time, it has saved my password.

  • Fire Fox will not store passwords and don't ask to store passwords

    Fire Fox will not store passwords

    Maybe this article will help you: user names and passwords are not saved

  • Where XP does not store the file in browser's history?

    Hello everyone, ok so I don't know Vista and Windows 7 stores the browser history in the same place but as on XP?

    Windows 7 it stores here: C:\Users\[USER]\\AppData\Local\Microsoft\Windows\History

    Where XP does not store the browser history? Also what Windows 2000?

    The store of XP in the following folder browser history

    C:\Documents and Settings\utilisateur\Local Settings\Historique

  • MS Fax does not store faxes

    MS Fax does not store faxes on folder shared network... all permissions are given on win xp sp3 connected for win 2003 server... I gave the user full Permision and he can create files on the folder of sparkle. all that I need to store a copy of fax on mapped drive I activated this option... it does not work.

    Thoughts?

    Hi BrianK,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows 7 forum.

    http://social.technet.Microsoft.com/forums/en-us/winserverprint/threads

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Illustrator will not store my settings. When I re - open the program, my settings are lost. How can I get the program to save my settings?

    Illustrator will not store my settings. When I close and reopen the program, some of my settings are lost; persistent color palettes, type of unit. How can I get the program to save these settings? We have several computers through Adobe CC and one of them has this issue. We have tried to reinstall the program, does not. Looking for someone who has had this experience and has an idea about a solution AND what is the problem.

    Jason

    Check the permissions on your user files. Looks like you have not allowed to save there who HAVE requires that the last thing that made when closing is to write the current version of the preferences.

  • 18 Firefox do not store persistent cookies.

    This happens also in FF 18 - cookies that are supposed to be kept are not.

    I tried the SQLite Database Browser tool, but found no questionable registration described above.

    I tried to delete the preferences of site - no change. Tried to delete permission.sqlite. Still no change.

    What it appears in is my online banking. It asks you to register to the computer and supposedly puts a 'secure cookie' in the browser. It does more - whenever I have to go through the application process for a new code by e-mail. It works fine under IE and used in Firefox. What's weird is that if I ask him to show cookies, it shows with expiration of January 2100. But it is not accessble to FF, while he was. Any other ideas?

    It is possible that the cookies.sqlite file that stores the cookies is corrupted.

    Rename (or delete) cookies.sqlite (cookies.sqlite.old) and delete other files to present as cookie cookies.sqlite - journal in the profile folder of Firefox in the case where the cookies.sqlite file has been corrupted.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the start safe mode window or make changes.
  • Firefox is not store passwords

    With the help of a PC with XP.

    I have intalled Firefox 4.01 after removing first of Firefox 3.

    I used an add-on to transfer passwords supported 3-4.

    Most passwords have been copied to the course, but some were not.

    My problem is that even if I have the option "Remember passwords for sites" ticked. This is not the case.

    When I enter the user name and password for a new site, if it does not Firefox store the password and the password not recognized.

    I have the module that best privacy 1.50 installed. I tried to disable it, but it made no difference.

    If all else fails, is there a way to manually add the name of user and password?

    Make sure that you do not run Firefox in private - browsing using Firefox without saving the story mode (permanent).

    • You enter private browsing mode, if you select: Tools > Options > privacy > History: Firefox will be: "don't forget the story ever.
    • To view the history settings and cookies, choose: Tools > Options > privacy, choose the setting Firefox will: use the custom settings for the story of
    • Uncheck: [] "Permanent private browsing Mode.
  • Firefox does not store the browing history

    Several weeks ago, I deleted my cache to solve a problem. Since that time, Firefox displays the last ten websites I went on the drop-down history menu, but when I click on view history, the window is empty and says 'no element' downstairs.

    I have studied this problem on other sites and those provided by other troubleshooting tips:
    1) ensured that the tools: Options: privacy is defined on do not forget history
    (2) ensure that private browsing is not enabled
    (3) typical subject: Config in my address and verified field as all the parameters: the browser history are by default (180 days; 40 000 objects)

    I'm sure that it is a simple value somewhere, but I'm out of ideas. Can someone give me a hint?

    If the menu history displays the elements of the story then that suggests that the story works correctly.

    This may be a problem with the places.sqlite file that stores the bookmarks and history.

  • Where notes stores data? Cannot delete a PDF file I want to keep in the Notes

    Hello

    Love the new notes... but I was wondering where the data are stored if you drag an image or a PDF in. I tried to do that, but then finder won't let me delete the PDF as it is said that it is used... is there a way to store these data in Notes - permanently and forget keep them anywhere else?

    Thank you!

    Gully

    I think that the images, PDF etc. files stay where they are and that a link with them is stored in the Notes.

  • Why not store the reference to notifying global

    Hi all

    I work with the authors of the notifications and the queues in several screws. I have strange behaviors, when I store the queue references and to notify in the global variables.

    I read some entries in this forum, and some say, it's a "bad idea" that "do not", to store the arbitrators in globals.

    Can someone tell me what is the real origin?

    concerning

    mitulatbati

    Furthermore this globals is a simply bad (just a little more higher education that I really recommend to minimize the use of globals for nothing other than a State of the boolean or sometimes some scalar value), all refnums LabVIEW use a garbage collection operation.

    The reason to use globals generally implies that you want to create the resource granting to one place and use somewhere else. But that often does not work with LabVIEW refnums if the producer and the consumer are not in the same VI hierarchy (for example, you create the resource in a startup VI and then spawn a VI plugin that continues while the boot VI ends). All refnums LabVIEW are automatically removed at the moment the highest level including the hierarchy VI opened refnum goes inactive. So both your plugin VI starts to work, the refnum and its object has already been deleted and therefore is not valid.

  • Where windows 8 do not store the azw files?

    I bought an amazon kindle book. I can find the book in the kindle app in windows 8, but I can't find the file real .azw on my computer. I ran a search and no luck. What I am doing wrong.

    Thank you

    Niall Stewart

    I too use Calibre and Windows 8. The Kindle app for win 8, I do not. What I've done, it's just to download Kindle for PC version XP, Vista and Windows 7. In this way, I get my 'Kindle' content and can then move files in Calibre. ;) It will download ALL your books if you tell it to Sync. The best way to avoid what is go to kindle store books in the clouds, switch to view most recent list, then click on this book. It will download the file. The first time that it will be longer, but after that, it will be a breeze!  I hope this helps. :)

  • Windows not opening not store

    -Original title: windows store

    everytime I open my Microsoft store, says he can, t connect to the internet, although my internet works fine.

    I'm not able to download the windows 8.1 m.

    Help me solve this problem.

    Hello

    Please refer to the suggestions mentioned here and see if they will help you:

    http://www.kapilarya.com/cant-open-Windows-store-in-Windows-8

    Hope this helps, good luck :)

  • Does not store download Windows 8.1 app

    I have a laptop Dell Windows 8 running.  There is only a single user account on this computer.  I confirmed that it shows as an administrator account in the control panel.  When I try to download Windows 8.1 on the App Store, I get a message saying that I need to log in with an administrator account in order to download.  I am logged on as administrator, so I don't know what to do next.  I tried to disable my McAfee anti virus and also re-start, but can not get 8.1 to download.  I'd appreciate any help.

    Hi Waldi,

    Did you the latest changes on the computer before this problem?

    Please refer to suggestions of Pinaki reducing replied 9 December 2013
    http://answers.Microsoft.com/en-us/Windows/Forum/windows8_1-windows_install/Windows-81-update-from-store-error-to-log-in-with/5d2e78df-55ca-4d73-B4EC-123fd117ae58

    I hope this helps to solve the problem. Please come back for any clarification on this or any issue of Windows. We will be happy to help you.

  • Apps does not / not opening not store

    I upgraded from 8 to 8.1. Since then, I can't open some of my applications. I can't access my e-mail and I can't open Skype. I have uninstalles Skype but impossible to re-install now that he continues to send me to the app store, which does not open also. Should I restore windows 8 and 8.1 to uninstall?

    Hi Rob,

    It could have happened because of the cache store.

    I suggest you to clear the cache to store and check.

    Follow these steps to do so.

    (a) on the screen, press Windows key + R to open the Run dialog box.

    (b) type WSReset.exe and press enter.

    I also suggest you to download and run the troubleshooter modern UI App from the following link. He could tell us the reason behind the issue and fix accordingly.

    http://download.Microsoft.com/download/F/2/4/F24D0C03-4181-4E5B-A23B-5C3A6B5974E3/apps.diagcab

    Reference:

    Why can't find or install the application on the Windows Store?

    http://Windows.Microsoft.com/en-us/Windows-8/why-find-install-app-Windows-store

    Let us know the status of the issue. We would be happy to help you.

Maybe you are looking for