flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OK <p...@olafkrueger.net>
Subject Re: Persistent Data
Date Tue, 28 Feb 2017 20:18:17 GMT
bilbosax wrote
>  Could you give me your suggestions? (i do not want to store them in a
> sqlite database)

Sounds like it's time to separate your model from your view ;-)
As Benjamin said it's a good idea to persist your data by using some AS3
classes that represents your model.
Probably there're countless aproaches how to achive this.
By implementing this and other typically stuff to separate the concerns by
yourself you maybe end up with the decision to use one of the frameworks out
there which already solved a lot of things for you (e.g. PureMVC, Parsley,
Swiz, ...).

However, one simple approach to just resolve your current issue could be to
inject a model object [1][2] to your view.
You have to implement a public variable e.g. var myModelVO:MyModelVO at your
view to achive this.

HTH,
Olaf


MyModelVO.as:

[Bindable]
public class MyModelVO
{
	public var searchItem:String;
	// ...
}

MyView:
<<view:MyView myModelVO="{new MyModelVO()}" >








--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Persistent-Data-tp14735p14740.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message