realbasic-games
[Top] [All Lists]

Re: Question regarding class / subclass

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Question regarding class / subclass
From: Seth Willits <seth at freaksw dot com>
Date: Wed, 23 Jun 2004 11:50:48 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
List-help: <mailto:realbasic-games-request@lists.realsoftware.com?subject=help>
List-id: REALbasic Games <realbasic-games.lists.realsoftware.com>
List-post: <mailto:realbasic-games@lists.realsoftware.com>
References: <E7690953-C541-11D8-96A8-000A957887E6 at goodlearning dot com>
On Jun 23, 2004, at 11:19 AM, Paul Kaiser wrote:

Can I declare the array to be of type "Object3D" and have it reference various subclasses of Object3D?

Yes. It's the same with any subclassing. Since all the subclasses are descendants of the superclass, you can group them by their superclass in an array. When you access the however, you'll have to typecast them to be of the particular subclass.



Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"When you are courting a nice girl an hour seems like a second. When you
sit on a red-hot cinder a second seems like an hour. That's relativity."
        -- Albert Einstein
------------------------------------------------------------------------ ---

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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