Hmm. Could be timing like you are suggesting. You could stick some breakpoints on PersistenceManager and get a better sense of what it is doing.
On 1/14/14 1:10 AM, "Saframan" <[email protected]> wrote: >Hey! >Finally I found the problem. >It came from my main mxml file ( TabbedViewNavigatorApplication ). There I >created an instance of the PersistenceManager using the variable >declaration. Furthermore, I tried to read some values from the memory >using >this PersistenceManager instance. The instance is fine but the ³reading² >killed all other savings (randomly, but usually all of them after a couple >of restarts) of the persistence manager from previous app starts. The >persistNavigatorState functionality was not working neither - after every >full restart it started always with the first view. >As soon as I moved the memory access to a handler, for example the >initialize handler, everything became fine. >Don¹t know where it came from. Probably the memory access came too early >at >the app start process? >Here are the code examples: The first one didn¹t work and killed all >stored >values. The Second was fine! >BAD: > ><?xml version="1.0" encoding="utf-8"?> ><s:TabbedViewNavigatorApplication >xmlns:fx="http://ns.adobe.com/mxml/2009" >xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="320" >persistNavigatorState="true" >initialize="initializeHandler()"> > > > > <fx:Script> > > import spark.managers.PersistenceManager; > public var persistenzManager:PersistenceManager = new >PersistenceManager(); > public var geraeteKlasse:Object = >persistenzManager.getProperty("Variable >"); > > protected function initializeHandler():void > { > > > ŠŠ > > >GOOD: > ><?xml version="1.0" encoding="utf-8"?> ><s:TabbedViewNavigatorApplication >xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="320" > persistNavigatorState="true" >initialize="initializeHandler()"> > > > > <fx:Script> > > import spark.managers.PersistenceManager; > public var persistenzManager:PersistenceManager = new >PersistenceManager(); > public var geraeteKlasse:Object; > > protected function initializeHandler():void > { > geraeteKlasse = > persistenzManager.getProperty("Variable"); > > > > >-- >View this message in context: >http://apache-flex-users.2333346.n4.nabble.com/PersistenceManager-not-load >ing-Data-after-full-restart-of-APP-iOS-Android-tp4340p4454.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
