On Mon, Jan 19, 2009 at 4:21 PM, Przemyslaw Czerpak <[email protected]> wrote:
> In Class(y) code class function should return "class object" not object > of given class. This class object understands :NEW() message and create > object of given class sending to this object :INIT() message with > parameters passed to :NEW(). Neither Harbour nor xHarbour have real > class object support and class functions always return object of given > class and both NEW() and INIT() are messages of this object. The default > implementation of :NEW() inherited from HBOBJECT class simply calls :INIT() > method. > I wanted to add real class object support to Harbour but I do not know > if it's still possible. People already created a lot of code which does > not use :new() at all so it will be serious backward compatibility problem. > It's a classic example of problems created by unfinished code added to > official repository which later cannot be easy finished or fixed. > Probably now the only one way to resolve this problem is creating new > hbclass.ch and leaving the old one for backward compatibility. Maybe > I or someone else will make it in the future. Code which calls NEW() > should work with both versions. If it is only a compatibility issue I think it should be be fixed asap. The two headers approach is perfect. Also in the new header I'll keep only the Class(y) "interface". It is the only interface that have a usable documentation. best regards, Lorenzo _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
