realbasic-plugins
[Top] [All Lists]

Re: Protected Constructor?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Protected Constructor?
From: Alfred Van Hoek <vanhoek at mac dot com>
Date: Sun, 10 Apr 2005 21:10:04 -0400
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
on 4/10/05 8:48 PM, Christian Schmitz at support at monkeybreadsoftware dot de
wrote:

> Alfred Van Hoek <vanhoek at mac dot com> wrote:
> 
>> 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.
> 
> No. Search the archives. One of the RS engineers meantioned that the
> protection stuff is not available for plugins.

OK, while second thoughts tell me that if it were possible RB might complain
that a default constructor is not available ...
> 
> You can check in your default constructor whether you are in design mode
> (REALinRuntime()==false) and if yes, you can raise an exception.

The problem is of course that the default constructor needs to be called in
design time as well, in order for rb to create an instance on the window.


Alfred

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