realbasic-nug
[Top] [All Lists]

Re: Subclassing Question

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Subclassing Question
From: Randall Meadows <randy at not-pc dot com>
Date: Thu, 22 Aug 2002 10:32:34 -0400
On 8/22/02 at 7:16 AM -0700, Will Leshner wrote:

You probably should make a super class that returns NIL for NewObject. That way if somebody forgets to override they will find out pretty quickly.

<RB-newbie/OO-novice>
Would it not be better form to throw and exception in this case, instead of returning nil? In my mind, there is a subtly different, but important, distinction between the two.
</>

Or, perhaps better yet, is there an RB equivalent of "pure virtual"?

--
randy
To see the two cutest kids ever, visit <http://www.not-pc.com/>

In a world without walls and fences who needs windows or gates?


<Prev in Thread] Current Thread [Next in Thread>