Hmm. Well, this approach won't stop you from instantiating an object of that class at runtime (and that's what virtual means - uninstantiable). The approach I gave would tell you about your sins at compile time, which might be better than your customer telling you about them, if you know what i mean.
Best wishes, - Maximilian Tyrtania | [EMAIL PROTECTED] fischerAppelt Kommunikation GmbH Tucholskystr.18 | D-10117 Berlin | Germany Tel. ++49-30-726146-728 http://www.fischerappelt.de -- Am 03.09.2006 10:49 Uhr schrieb "Phil M" unter <[EMAIL PROTECTED]>: > On Sep 3, 2006, at 12:33 AM, Maximilian Tyrtania wrote: > >>> How do you set a Class to be Virtual? >> >> There is no built in way, but setting the constructors scope to >> "private" >> achieves that. > > Hmm... I will have to try that. > > Actually I think I figured out a method which achieves a similar > effect. The set of classes I am working with uses an Interface; and > so in the "virtual" class I have a this Interface method set to > Private and have an obnoxious MsgBox appear: > > MsgBox "Programmer's Error: You must implement the function > MinimumWidthForStyle() defined in the XBarInterface. Please add > this function to your subclass with the Window instance with the name > of " + Me.Name + "." > > The class is designed so that that particular method fires right at > launch, and so you only get embarrassed once. =) _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
