On Jan 26, 2007, at 9:13 PM, Norman Palardy wrote:
void ?
But isn't a constructor actually returning an instance of the class?
In the following message:
<http://support.realsoftware.com/listarchives/realbasic-plugins/
2005-11/msg00047.html>
Joe implies that a function called "Constructor" in the Method
definition is special, acting like a real constructor. From that I
would assume you could do either of the following:
peep1 = new myPersonClass()
peep2 = new myPersonClass("Fred", 37)
And while I know in C++ you don't declare a return type, I wasn't
sure in RB.
Steve
_______________________________________________
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>
From Sat 27 Jan 2007 03:31:49 +0100
Return-Path: <realbasic-plugins-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
id 24CF2182E3C1; Fri, 26 Jan 2007 18:32:08 -0800 (PST)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on
www.realsoftware.com
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=4.5 tests=AWL,BAYES_00 autolearn=ham
version=3.1.1
Received: from lists.realsoftware.com (lists.realsoftware.com [209.198.132.125])
by xmail.realsoftware.com (Postfix) with ESMTP id B8356182E3B7;
Fri, 26 Jan 2007 18:32:03 -0800 (PST)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id B0294187E172; Fri, 26 Jan 2007 20:31:55 -0600 (CST)
X-Original-To: realbasic-plugins at lists dot realsoftware dot com
Delivered-To: realbasic-plugins at lists dot realsoftware dot com
Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de
[80.67.18.13])
by lists.realsoftware.com (Postfix) with ESMTP id ED6FB187E165
for <realbasic-plugins at lists dot realsoftware dot com>;
Fri, 26 Jan 2007 20:31:50 -0600 (CST)
Received: (qmail 8681 invoked from network); 27 Jan 2007 02:31:49 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 125 dot
146])
(envelope-sender <support at monkeybreadsoftware dot de>)
by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP
for <realbasic-plugins at lists dot realsoftware dot com>;
27 Jan 2007 02:31:49 -0000
To: realbasic-plugins at lists dot realsoftware dot com (REALbasic Plugins)
In-Reply-To: <F791208F-2EA6-40A9-8B2D-652ECA72064C at cahir dot net>
From: support at monkeybreadsoftware dot de (Christian Schmitz)
Date: Sat, 27 Jan 2007 03:31:49 +0100
Message-ID: <1hskxre dot 1g83usktlnfvaM%support at monkeybreadsoftware dot de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Organization: Monkeybread Software Germany
X-Face: nrf3>{WQ6c&r+7 at e)"]0G60`-6ND^)I2mI%>)QGYa=9"=7jhd-g2|b3!>Al0+
Ccb%xGQshhi|g at QU2$
User-Agent: MacSOUP/D-2.7 (Mac OS X version 10.4.8)
Subject: Re: Class Constructor
X-BeenThere: realbasic-plugins at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot
com>
Sender: realbasic-plugins-bounces at lists dot realsoftware dot com
Errors-To: realbasic-plugins-bounces at lists dot realsoftware dot com
Stephen A. Cochran Lists <stephen dot a dot cochran dot lists at cahir dot net>
wrote:
On Jan 26, 2007, at 9:13 PM, Norman Palardy wrote:
=20
> void ?
=20
But isn't a constructor actually returning an instance of the class?
No. Constructors in RB just initialize the data.
You need to raise an exception to prevent use of the new object.
Gru=DF
Christian
--=20
Around eleven thousand functions in one REALbasic plug-in.=20
The Monkeybread Software Realbasic Plugin v6.5. Now universal!
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
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>
|