Re: [Oorexx-devel] Implementing alternative 'new' methods in the native API

2008-12-14 Thread Mark Miesfeld
On Sun, Dec 14, 2008 at 8:51 AM, David Ashley wrote: > There are other alternatives besides subclassing. I discovered them when > doing the RexxGTK library and I use them all over the place. David, Thanks for this. I'll look closer at the RexxGTK code. I've browsed through many a time, but wi

Re: [Oorexx-devel] Implementing alternative 'new' methods in the native API

2008-12-14 Thread David Ashley
Mark - There are other alternatives besides subclassing. I discovered them when doing the RexxGTK library and I use them all over the place. What I needed was very similar to your requirements. I needed alternative init methods that could take complex arguments and then provide a class instanc

Re: [Oorexx-devel] Implementing alternative 'new' methods in the native API

2008-12-13 Thread Mark Miesfeld
On Sat, Dec 13, 2008 at 1:24 PM, Rick McGuire wrote: > There's only one init method, which is normally called by the new > method of the class object. The normal pattern if you wish to have > multiple versions of "new" is to have the additional class methods > call new, then perform any addition

Re: [Oorexx-devel] Implementing alternative 'new' methods in the native API

2008-12-13 Thread Rick McGuire
There's only one init method, which is normally called by the new method of the class object. The normal pattern if you wish to have multiple versions of "new" is to have the additional class methods call new, then perform any additional initialization after new completes. For example, .array~of

[Oorexx-devel] Implementing alternative 'new' methods in the native API

2008-12-13 Thread Mark Miesfeld
What would be the proper way to implement something like: a = .array~new b = .array~of(1, 2, 3,) using the native API for a new class? In other words, I want to define a new class where there are several different *sets* of initialization options that can be used to create the new object. R