The problem is that methods are stored into e.g. 'LuaNumber' namspace
and you classname is 'number', used during methodlookup. A current
workaround would be to alias the name into the other namespace:
meth = Parrot_find_global(INTERP,
const_string(INTERP, "LuaNumber"),
const_string(INTERP, "tostring"));
Parrot_store_global(INTERP,
const_string(INTERP, "number"),
const_string(INTERP, "tostring"),
meth);
The plan is to attach the namespace aka methodhash to the class itself,
then this hackery isn't necessary anymore.
>
> Françoi
> s.
leo
I add with success this code in class_init().
Thank for your help.