roxen.lists.pike.general

Subject Author Date
Re: Is there anyway to have a class always be inherited from other objects? Dino M. Gambone <dmgambone[at]yahoo[dot]com> 09-09-2009
Oh well.  Maybe I can request a feature to be added to allow someone to define a
default base class through the CompilationHandler class (how does one submit
enhancement requests?).  

Not a big deal.  I can force the user to specify a base class and capture it
through the resolv method.

Thanks for the response.




________________________________
From: Henrik Grubbström <<grubba[at]roxen.com>>
To: Dino M. Gambone <<dmgambone[at]yahoo.com>>
Cc: Pike mailinglist <<pike[at]roxen.com>>
Sent: Wednesday, September 9, 2009 11:39:20 AM
Subject: Re: Is there anyway to have a class always be inherited from other
objects?

On Wed, 9 Sep 2009, Dino M. Gambone wrote:

> I found this little thread from 2004:
http://thread.gmane.org/gmane.comp.lang.pike.user/1686
> Re: custom master, compile() and compile_string() arguments (mentioned but not
explained in docs)
> 
> What is interesting is what would happen if I overrode __empty_program() and
returned a custom program that had some pre-defined methods on it. Maybe Henrik
can shed some light on this.  Is it possible to return my own custom program
from __empty_program()?

I agree that that would probably be a nice way to do it, but if you try
it with only Pike-level code, you will most likely get the quite unusual
compilation error "Placeholder program is not virgin!". Note also that this
argument is only used for the implicit top-level class.

--
Henrik Grubbström                    <grubba[at]roxen.com>
Roxen Internet Software AB