Storage never initializes in simulator

15 views
Skip to first unread message

christophe...@gmail.com

unread,
Nov 15, 2013, 3:33:43 PM11/15/13
to codenameone...@googlegroups.com, chris....@rogers.com
I am trying to use the Storage object to persist data in my application. 
Storage.isInitialized() always returns false and so obviously when I call Storage.getInstance() it throws an exception.
Periodically checking isInitialized() in a loop with a wait also never returns true.
Does anyone have any thoughts on why I can't use Storage object?  This is in the simulator.

Shai Almog

unread,
Nov 15, 2013, 4:33:12 PM11/15/13
to codenameone...@googlegroups.com, chris....@rogers.com, christophe...@gmail.com
Waiting in a loop will probably not do anything.
Are you invoking this from a static initializer or something like this?
Storage should always be initialized since getInstance() effectively initializes it.
What's the stack trace you are getting with the exception.
Reply all
Reply to author
Forward
0 new messages