On Tue, 2 Dec 2003, Dan Sugalski wrote:
> *) Creating new objects involves calling the ->init vtable entry *on
> the class*. Because of this each class gets a custom vtable where the
> init method has been swapped out for one (from objects.c) that
> creates a new object instead.
Well, cool! How do I this from parrot?
I've been trying things along the lines of:
.sub _main
.local object Cat
.local object felix
newclass Cat, "Cat"
P2 = Cat
S0 = "init"
callmeth
felix = P0
#...
end
.end
... But haven't figured out the magic formula yet
That code above gives:
Method 'init' not found
in file '(unknown file)' near line -1
(If anyone can post a working example of the code
above I'd really appreciate it!)
Sincerely,
Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------