realbasic-plugins
[Top] [All Lists]

Overloading a Constructor

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Overloading a Constructor
From: Phil M <phil at mobleybros dot com>
Date: Fri, 21 Jul 2006 15:50:51 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
How do you overload a constructor for a class defined with REALclassDefinition? I would like to have the following:

    Constructor(p As Picture)
    Constructor(w as Width, h As Height)

The documentation only seems to provide information for a default (no parameters) constructor and that is one that I *don't* want.


_______________________________________________
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  Fri 21 Jul 2006 22:08:10 +0200
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 E0BE6872764; Fri, 21 Jul 2006 13:08:31 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on realxserve.local
X-Spam-Level: X-Spam-Status: No, score=-2.6 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 D937B872759;
        Fri, 21 Jul 2006 13:08:26 -0700 (PDT)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id 2804E13A7BEC; Fri, 21 Jul 2006 15:08:18 -0500 (CDT)
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 0D6D213A7BDF
        for <realbasic-plugins at lists dot realsoftware dot com>;
        Fri, 21 Jul 2006 15:08:13 -0500 (CDT)
Received: (qmail 26368 invoked from network); 21 Jul 2006 20:08:11 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 119 dot 
67])
        (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>;
        21 Jul 2006 20:08:11 -0000
To: realbasic-plugins at lists dot realsoftware dot com (REALbasic Plugins)
In-Reply-To: <DB4D359E-FB43-460E-BA81-07B4E654CD70 at mobleybros dot com>
From: support at monkeybreadsoftware dot de (Christian Schmitz)
Date: Fri, 21 Jul 2006 22:08:10 +0200
Message-ID: <1hiuist dot 1xnb41aq4hw21M%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.7)
Subject: Re: Overloading a 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

Phil M <phil at mobleybros dot com> wrote:

How do you overload a constructor for a class defined with =20
REALclassDefinition?  I would like to have the following:
=20
     Constructor(p As Picture)
     Constructor(w as Width, h As Height)
=20
The documentation only seems to provide information for a default (no
parameters) constructor and that is one that I *don't* want.

that's the initialiser which is always called.

Just define two methods for your constructors.

Gru=DF
Christian

--=20
Around eleven thousand functions in one REALbasic plug-in.=20
The Monkeybread Software Realbasic Plugin v6.2.
<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>


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