Thanks, Stephan and Anton, all yours solutions works fine, but not as I
expected!!
Yes, Holder() is the right way, and two functions are right too!
But I want to suggest a new property (like "Holder" or "This") called
"Owner", a reference to the object that own (in origin) the property.
It could allow things like that:
var echo=$out.puts
echo("Hello!!");
It simplify the creation of "delegates properties", in turn of put a
InternalField for each property. The scope of the delegated property is the
same of its owner.
Do you thing that this suggest is possible?
-----Mensaje original-----
De: [email protected] [mailto:[email protected]] En nombre
de Stephan Beal
Enviado el: martes, 11 de mayo de 2010 20:54
Para: [email protected]
Asunto: Re: [v8-users] a simple question about
"args.This()->GetPointerFromInternalField"
On Tue, May 11, 2010 at 8:34 PM, Seiji Sam Lee <[email protected]>
wrote:
> var echo=$out.puts;
...
> Are there any way to allow that code like that works fine? That is, "echo"
> call catch correct "FILE*" parameter of "$out"?
Something like:
var echo = function() {
$out.puts.apply( $out, Array.prototype.slice.apply( arguments,[0]) );
};
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users