Static reference returning different values every time
Hi,
I’m developing an application to log call data on Blackberry Bold -9000. The application works as both ‘foreground’ and ‘background’ application. The call data is being stored in a ‘static Vector’. But when I try to check the data stored in the ‘Vector’, it returns different set of values in both states. I also tried checking the ‘hashCode ()’ value of the reference and they were also different between the two states. Please let me know any other setting to correct this issue. Code:
---Application Main file--- |
There is no setting to fix this. It has to do with the way the RIM OS marshals the data context for different processes.
In the CallLog listener, you are in a completely separate context from your "mainScreen" class. There are two ways to work around this: 1) use the RuntimeStore to create a singleton, or 2) from the CallLog to fire a global event, which you will catch in your own app context (with eventListener) and from there get the correct copy of the Vector. |
All times are GMT -5. The time now is 05:51 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.