> Hi, > > I can't see what i've missed here. > > In this code i have a trace in saveState that nevers appears in the console > panel. > > <mx:VBox > xmlns:mx="http://www.adobe.com/2006/mxml" > implements="mx.managers.IHistoryManagerClient" > width="400" height="100" > initialize="init()"> > > <mx:Script> > <![CDATA[ > import mx.collections.ArrayCollection; > import mx.managers.HistoryManager; > import com.xxx.admin.model.AdminModelLocator ; > > > ///////////////////////// > // IHistoryState methods > ///////////////////////// > > public function loadState(state:Object):void > { > if (state) > { > _selectedIndex = state.selectedIndex; > _dataProvider = state.dataProvider; > } > } > > public function saveState():Object > { > trace('saveState!'); > var state:Object = {}; > state.selectedIndex = _selectedIndex; > state.dataProvider = _dataProvider; > return state; > } > > > public function init():void > { > HistoryManager.register(this); > } > > public function set dataProvider(value:ArrayCollection):void > { > _dataProvider = value; > HistoryManager.save(); > } > > public function set selectedIndex(value:Number):void > { > _selectedIndex = value; > HistoryManager.save(); > } > > > [Bindable] > private var model:AdminModelLocator = > AdminModelLocator.getInstance(); > > [Bindable] private var _dataProvider:ArrayCollection; > [Bindable] private var _selectedIndex:Number; > ]]> > </mx:Script> >
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

