TDatabase End() method

TDatabase End() method

Postby James Bott » Sat Jul 15, 2017 12:54 am

Antonio,

If I may make a suggestion, TDatabase doesn't have an End() method. Yes, I know it has a Close() method, and that is consistent with the CLOSE statement. However, as an object, the Close() method name violates the polymorphism concept. Most of the other classes have an End() method.

So if you just add this line:

METHOD End() inline ::Close()

We can then use oDBF:End() syntax and it won't break any existing code.

I notice that you have done this in other classes that normally use "destroy" to end them.

Regards,
James

PS: Of course, I am asking because I often try to use the End() method and it crashes.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TDatabase End() method

Postby nageswaragunupudi » Sat Jul 15, 2017 1:54 pm

Done
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10207
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TDatabase End() method

Postby James Bott » Sat Jul 15, 2017 3:46 pm

Thank you Nages.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests