Hmm... that's what I was afraid of. In the meantime, I did an end run around the problem by making the class methods objects that implement `()(), that way I can store the method name in the object. The most obvious downsides to this are a) that it becomes more difficult to replace these in a subclass, and b) i've not yet figured out a reasonable way to do better typechecking. I suppose it's a non-issue for objective-c, but it's still a compromise i'm not completely pleased with.
Perhaps we can discuss this for a few moments in Riga.
Bill
On Tue, 10 Oct 2006, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
I guess you'd have to loop through the constant area of Pike_fp->current_object->prog, looking for a callable with a pointer matching your function.
Constant functions are a bit odd creatures since it's something that doesn't exist on the pike level (would be nice to have, though).
If you make a function to do this, I think it could be useful to have in the core, i.e. in program.{c,h}.