On 14/gen/09, at 15:43, Alfred Van Hoek wrote:
On Jan 14, 2009, at 9:35 AM, Massimo Valle wrote:
So I can avoid using shared methods. Just use the constructor and
raise an exception if the argument is not valid.
If there is no need for the user to subclass the class or you don't
want users to subclass it to begin with, then you could provide a
(global or module) method that would return an instance. Under the
hood you would call REALnewInstance (or REALnewInstanceWithClass)
and if the arguments are not right, you can unlock the instance with
REALUnlockObject and return a nil instance.
Well, the user will be... me!
I'm only trying to build the class so I can't inadvertently
instantiate it using the New operator.
Anyway, there is no need to subclass the class.
Thanks,
Massimo Valle
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>