realbasic-nug
[Top] [All Lists]

Re: Instantiating object (Re: New 2K5 trial)

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Instantiating object (Re: New 2K5 trial)
From: Juergen Schreck <juergen dot schreck at innernine dot com>
Date: Mon, 29 Aug 2005 18:33:09 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <E66B2B85-5858-45C4-A338-42CDFF8ABC3D at innernine dot com> <6f5cb228778072c5534ad8c81ffeebdd at satx dot rr dot com>

On Aug 29, 2005, at 6:11 PM, William Squires wrote:

Polymorphism. A method can declare the type of one of its arguments as 'Object' and that'll allow a reference (including nil) to any class to be valid. Let's say you have two classes, 'A' and 'B'. Neither is a subclass of the other, and you want to allow a method (sub or function) to take an instance of either and print it to the screen with the MsgBox function, after some fancy formatting, etc...

snip...

I understand what you're saying. But it still doesn't explain why you'd want to 'new' an object.

Regards,
Juergen

_______________________________________________
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>

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