Thanks Ralf,
Finally got it :)
I think this has solved my issue.
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
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 ; )
@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
I give up for now. Six hours is long enough : )
I will use
User.getInstance().name = so.data.user.name;
Tried that by setting _instance to public earlier today.
I will check it out again.
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.
--
var user:User = User.getInstance();
Can't find the words to describe my problem.
It's not easy, it's difficult to grasp.
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
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
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
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
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
13 matches
Mail list logo