realbasic-plugins
[Top] [All Lists]

Re: Protected Constructor?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Protected Constructor?
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Mon, 11 Apr 2005 23:27:55 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE7F3BA3 dot C57F%vanhoek at mac dot com>

On 11.4.2005, at 00:22, Alfred Van Hoek wrote:

When a class defines a custom constructor with arguments it will be
impossible to right-click on the window and choose the class leading to a valid instance. The reason is that a 'default' constructor is missing. Thus
another custom constructor without arguments is registered in the
REALmethodDefinition and everything is fine under this particular condition.

One caveat is that a user can call MyClass = new Class1, but this leads to an instance that won't work. He/she should use the constructor that takes
arguments.

Is there a way to declare a constructor in the plugin that is protected or
private?

Alfred


The only way I know around it is for the user to call the needed constructor of the parent class from his subclass constructor.

--
______________________________________________________________________
Björn Eiríksson                            bjorn at einhugur dot com
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 45 countries world wide.
______________________________________________________________________
For support:                               support at einhugur dot com
To post on the maillist:                   einhugur at yahoogroups dot com
_______________________________________________
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>