Lot's of things going on here. It's hard to tell without more information,
but it looks like you are playing fast and loose with scope. Generally, you
shouldn't have to worry about "un-binding" things.

Can you post an entire runnable code example?

You might want to take a look at http://eloquentjavascript.net/ if you
haven't already.



On Sun, Aug 5, 2012 at 5:03 PM, Seiji Sam Lee <[email protected]> wrote:

> I keep on working in my node-based http server.
>
> I am implementing sessions and, into this, installing code to be executed
> latter.
>
> So I found a problem and need a bit of inspiration.
>
> The fast way to explain the problem is ask: how can un-bind a variable?
>
> well, I have a function:
>
> function hello()
> {
>   $server.response.echo("Hi, world!");
>   $server.end();
> }
>
> First time the page is requested, this function is installed, and second
> time this functions is executed (both with different response objects).
>
> This doesn't work, but this does:
>
> function hello($server)
> {
>   $server.response.echo("Hi, world!");
>   $server.end();
> }
>
> Obviously the problem is the first version of 'hello' store the reference
> to $server, and the second no, because it is passed as arguments, and bind
> is delayed.
>
> Its possible to re-bind a code, that is, a function?
>
>
> My first idea is implement $server (and other globals objects) as
> pure/complete proxies...
>
> Thanks a lot: Fran.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-**
> 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
> nodejs+unsubscribe@**googlegroups.com<nodejs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>

-- 
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

Reply via email to