[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Metatables, C and Script...
- From: David Given <dg@...>
- Date: Sun, 25 Oct 2009 22:01:42 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kenk wrote:
[...]
> So now O=AWindowClass.new{fields and stuff} ... When
> 0.FunctionInProtoTypeTable() is called, it won't find it in AWindowClass
> and look in the prototype's table. which it finds...Problem is, the
> initial 'self' state isn't be passed through...as get's done when you
> reference a method with anObject:AFunction();
That's because you're calling it with . and not :, if I've understood
you correctly.
foo:bar() is syntactic sugar for foo.bar(foo). There's nothing magical
about methods, unlike Javascript... so if you forget to use : (which I
do periodically), then all the parameters are wrong.
- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There is nothing in the world so dangerous --- and I mean *nothing*
│ --- as a children's story that happens to be true." --- Master Li Kao,
│ _The Bridge of Birds_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFK5MrFf9E0noFvlzgRAqTxAKCaoDAki4c8nu4WE4mzD8i3ebLE7wCgx/c/
U2L93D5VSXx5UlR9lRx86xo=
=ry65
-----END PGP SIGNATURE-----
- References:
- comment error about OP_VARARG in lopcodes.h, VirusCamp
- Re: comment error about OP_VARARG in lopcodes.h, KHMan
- Re: comment error about OP_VARARG in lopcodes.h, VirusCamp
- Re: comment error about OP_VARARG in lopcodes.h, KHMan
- Metatables, C and Script..., Kenk
- Re: Metatables, C and Script..., Luiz Henrique de Figueiredo
- Re: Metatables, C and Script..., Kenk
- Re: Metatables, C and Script..., Kenk