Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHarbour and Class(y) 1

Status
Not open for further replies.

Frandalf

Programmer
Sep 26, 2002
34
BE

HI everybody,

Everyone seems to agree that switching to XHarbour is a good idea and I want to give it a try because I can see the advantages too. Since I have a very large POS program with many PRG files, I know that converting will be a BIG job and before I begin I would like to know what I will have to do with all the classes I made using Class(y). Will I still be able to use the Class(y) library in XHarbour or do I have to convert them all to a XHarbour equivalent?

Thanks
 
xHarbour's OOP model is meant to be close compatible to Class(y), but recent newsgroup messages indicate there is some compatibility problem in certain cases. Don't have the details at hand now, I'll report ASAP.
In the meantime you could try to compile using the xHarbour builder demo from (free download, works for 30 days) using that you can decide wether xHarbour is fit enough to compile your project(s) and either start using the open-source version ( or buy a supportcontract and some extras from xHarbour.com

I'll report on the issue(s) later (from home) where I have the NG database available.

HTH
TonHu
 
Thanks TonHu,

I will try the builder. I fear it will not be an easy job but then again, don't know till I tried...
 
Welcome aboard the xHarbour comunity :D

The Class(y) vs xHarbour compatibilty issue boils down to the implementation of classes, or rather, the difference of implementation. F.i. this tiny snip from the rather hefty discussion between 2 major developers of xHarbour is what IMHO it all comes down to:
Code:
 In classy
    o:=myclass():new()
    ? o:class == myclass()
is true.
(corrected a small typo)
And while this construction may or may not be desired, it is not supported by xHarbour as the instantiation of a class is not the same as the definition of that class (in bytes in memory that is) and can not be compared to be equal.
The whole concept of the above is at the top of my OOP knowledge, and I certainly don't know anything about the OOP implementation of both Class(y) or xHarbour, but you should probably check your code for constructs like this, to avoid confusion while testing compatibility.
I haven't used xHarbour OOP enough to present a fix or workaround for this 'feature', sorry, and it also isn't presented in the newsgroup thread, so it's probably impossible to solve without rethinking the entire solution.
It is agreed by all involved in the discussion that the work of Anton van Straaten (Class(y)) is a fine piece of craftmanship in design and implementation.
It's just different than other implementations.

For a deeper understanding it's nice to have the xHarbour Developer Network at that contains the available helpfiles and lots of samples. The part of OOP (use that as a search term) is not that elaborately documented, but it's usable as a starting point in the xHarbour OOP dialect. Basic knowledge of OOP programming is required though.

HTH
TonHu
 
Thanks TonHu,

Since I only used Class(y) in a small part of my code (I started using it late), I don't think that there will be problems then. I use only the basics of OOP and haven't gone very deep into it (yet). I will surely start installing Xharbour soon and just see what happens. Looks like an interresting journey to come...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top