Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
Thanks Ralf, Finally got it :) I think this has solved my issue.

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Ralf Bokelberg
Yes, it knows about the type, so the shared object knows which class to use when recreating the instance. It's just - if you don't assign the user object from the SharedObject to the static _instance your User class simply returns a different user object. There is no implicit connection between th

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
I allready use registerClassAlias("be.webdevotion.business.User",User); to register the User class in the so.data. This way the shared object knows about the data type ; )

RE: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Dimitrios Gianninas
@yahoogroups.com Subject: Re: [flexcoders] Storing a Singleton in a Clientside Shared Object I give up for now. Six hours is long enough : ) I will use User.getInstance().name = so.data.user.name; -- WARNING --- This electronic message and its attachments may contain confidential

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
I give up for now. Six hours is long enough : ) I will use User.getInstance().name = so.data.user.name;

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
Tried that by setting _instance to public earlier today. I will check it out again.

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Ralf Bokelberg
You need to set the _instance of your User singleton to the value you get from the SharedObject. Cheers, Ralf. On 2/8/07, Webdevotion <[EMAIL PROTECTED]> wrote: var user:User = User.getInstance(); Can't find the words to describe my problem. It's not easy, it's difficult to grasp. --

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
var user:User = User.getInstance(); Can't find the words to describe my problem. It's not easy, it's difficult to grasp.

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Ralf Bokelberg
Hm, how can you set the instance, if its private? Cheers, Ralf. On 2/8/07, Webdevotion <[EMAIL PROTECTED]> wrote: sure: package be.webdevotion.business { public class User { private static var _instance:User; private var _email:String=""; private var _name:String=""; private var _transforma

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
sure: package be.webdevotion.business { public class User { private static var _instance:User; private var _email:String=""; private var _name:String=""; private var _transformations:Array; pri

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Ralf Bokelberg
Can you show the code of your User class? Cheers, Ralf. On 2/8/07, Webdevotion <[EMAIL PROTECTED]> wrote: and vice versa ... I want to store user information ( name, email, ... ) from my User singleton in my shared object and when the user returns, I want to read the data from the shared obj

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Webdevotion
and vice versa ... I want to store user information ( name, email, ... ) from my User singleton in my shared object and when the user returns, I want to read the data from the shared object and put all the values in my User class. I can do that by going thru al the public setters, but it'd would

Re: [flexcoders] Storing a Singleton in a Clientside Shared Object

2007-02-08 Thread Ralf Bokelberg
I'm not sure, if i understand you correctly. Are you setting the instance of your singleton to the value from the SharedObject? Cheers, Ralf. On 2/8/07, Webdevotion <[EMAIL PROTECTED]> wrote: Hello, I want to store an instance of a Singleton class "User" into a clientside Shared Object. Eve