[Wxruby-users] [DEVEL] Virtual Methods
wxruby at qualitycode.com
Sun Nov 21 01:21:46 EST 2004
Zach Dennis wrote:
> I had a few minutes so I implemented the WxPrinterDC class tonight, and
> I have a question on Virtual Methods. Is there a general rule of thumb
> to follow? Should they be implemented in the wxRuby header and source
> files, or should I ignore them?
I would have to look more closely to provide a really good answer. Some
virtual methods are mandatory, and without them the class is useless.
Others are rarely needed, and may not be worth the effort.
> They are not listed on the WxWidgets documentation page, but they are in
> the wxWidgets source file, as being public virtual methods.
That would lead me to leave them out at first, and only add them if
someone requests them. Unless they would be quick and easy to add, in
which case I might do them while I'm working on the class anyway.
> If I need trial and error I can do that, but thought maybe you followed
> a certain pattern...
My general pattern was to implement as much of a class that was easy,
and then add any other critical parts, and then to move on to the next one.
I hope that helps...
P.S. Thanks for your recent work! A project like this is really hard to
sustain, and any help is greatly appreciated.
More information about the wxruby-users