Depends on what you're using in the client. For ArrayCollections you can use mx.utils.ObjectUtil to make a deep copy; instead of a reference.
myCopyAC = ObjectUtil.copy(mySourceAC) ; -TH --- In flexcoders@yahoogroups.com, "quantum_ohm" <[EMAIL PROTECTED]> wrote: > > Hi Tim, > > what an idea ! so simple... > I just had to think about it :-) > Thx a lot, it works fine with your first suggestion. > > For CRUD, is it possible to create a copy of the "prefs" file with the > Flex/Air API ? > > Take care. > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Hi, > > > > "to display it again when the application is relaunched" > > > > This implies that you are saving and loading the pref settings data. If > > the user clicks the cancel button, you could reload the settings data > > that is already saved. For CRUD, it sometimes makes sense to edit a > > copy of the persisted data. That way, if the user cancels, just blow > > away the copy. If they save, send the edited copy to the server and > > update the model with the returned object; or directly from the copy, if > > you're not worried about sync issues and want faster user feedback. > > > > -TH > > > > --- In flexcoders@yahoogroups.com, "quantum_ohm" <charly.antoine@> > > wrote: > > > > > > Hi Everybody, > > > > > > I have an "options" button which leads to a new sate "options_state" > > > when it is clicked. > > > In this new state, I have a checkbox and two buttons "cancel" and > > "valid". > > > I handle fine the "valid" button which gets the checkbox state and > > > save it, > > > to display it again when the application is relaunched. > > > > > > Now my problem is if I change my checkbox state, then change my mind, > > > I can do "cancel", but > > > I don't see how anymore after tried several ways of doin' it... > > > Sorry for sounding kind of basic... :-( > > > >