On 4/16/07, Norman Palardy <[EMAIL PROTECTED]> wrote: > > On 16-Apr-07, at 11:38 AM, Dennis Birch wrote: > > > On 4/16/07, Charles Yeomans <[EMAIL PROTECTED]> wrote: > >> > >> On Apr 16, 2007, at 12:26 PM, Dennis Birch wrote: > >> > >>> Is it possible to not return an instance of a class from its > >>> constructor? > > > >> Not exactly. If you want to return nil if the constructor fails, > >> then you can define a shared method NewSomeClass(rs as RecordSet) as > >> SomeClass and call it. > > > > Thanks Charles. I'm a little confused about this approach. Can you > > elaborate? > > You don't use the constructor directly. > You use a shared method that returns an instance of your class. > It becomes a factory (something that makes instances of the class)
Thanks Norman. In other words, you're talking about creating a fallback that builds an instance of my class with default values? _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
