Hi all,
I'm trying to store a class object in a session (I actually use ExpressJS).
For class properties everything is fine, but class methods are missed, when
I access the object.
So for example, I have a class:
var SomeClass = module.exports = function() {
this.param1 = "1";
this.param2 = "2";
this.param3 = function(){ return "3"; };
}
And I instantiate it directly to a session:
req.session.myobj = new SomeClass();
When the new request is made, I'm trying to access the object
req.session.myobj, and I can access only param1 and param2; param3 is
unreachable (it is not defined).
Is there any way to solve it?
Thanks.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en