开发者

Storing TextArea Data

开发者 https://www.devze.com 2023-04-12 16:10 出处:网络
Should be an easy one, but it\'s past my bedtime: Problem: Want to type in TextArea, and whe开发者_如何转开发n visiting new view and return, see same text. Also when leaving application and returni

Should be an easy one, but it's past my bedtime:

Problem:

Want to type in TextArea, and whe开发者_如何转开发n visiting new view and return, see same text. Also when leaving application and returning, text should still be there.

Current Failed Attempt:

    [Bindable] public var note:String;
    protected function Notes_changeHandler():void
                {
                    note = Notes.text;
                }

mxml:

     <s:TextArea id="Notes" text="{note}" change="Notes_changeHandler()"/>

Thanks for the help!


The view is being garbage collected and you need to persist the data through an outside, non-view based class or using something like SharedObject.

0

精彩评论

暂无评论...
验证码 换一张
取 消