FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Why use MESSAGE in Classes
Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Why use MESSAGE in Classes
Posted: Wed Oct 25, 2006 10:00 PM

Hi All,

Why does certain classes, like TDATABASE, use the syntax:

MESSAGE Delete METHOD _Delete()

why not simply use:

METHOD Delete()

Regards
Gilbert Vaillancourt :o

Gilbert Vaillancourt
turbolog@videotron.ca
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Why use MESSAGE in Classes
Posted: Wed Oct 25, 2006 10:37 PM

Gilbert,

Because Delete() is a reserved function name so it can not be used.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Why use MESSAGE in Classes
Posted: Thu Oct 26, 2006 02:33 AM

Hi Antonio,

Thanks for your answer. It make sense.

I have another one. I am trying to figure out how does TDATABASE class create the object for each field of a database record. I was looking at the class and could not figure out how it does that. Can you tell me wich portion of code generates the field objects.

Regards :?

Gilbert Vaillancourt
turbolog@videotron.ca
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Why use MESSAGE in Classes
Posted: Thu Oct 26, 2006 06:57 AM

Have a look at OnError() method. By the way, the fields objects are not generated at all.

EMG

Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Why use MESSAGE in Classes
Posted: Wed Nov 01, 2006 11:17 PM

Hi Enrico,

You`re right, tho OnError METHOD handles the fields content to return when an error occurs in the class by doing cString := oDbf:fieldname or
oDbf:fieldname := cString

Doing some test I also figured out than an _ is passed in front of the fieldname when doing oDbf:filedname := cString, limiting the lenght of the fieldname to 9 positions. Does that mean that the field name of the database must not have more than 9 positions ?

This limitation seems to be only for FiveWin + Clipper. Am I right ?

Regards

Gilbert Vaillancourt
turbolog@videotron.ca
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Why use MESSAGE in Classes
Posted: Thu Nov 02, 2006 07:54 AM

Gilbert,

Yes, it is a Clipper limitation. With Harbour there is no such limitation.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Why use MESSAGE in Classes
Posted: Tue Nov 07, 2006 08:56 PM

Hi Antonio,

Thanks

I would like to know what possibility I have to implement an idea of mine.

The OnError METHOD receives an cFieldName an nError parameters. Is nError always the same or could it be different ? Where is nError comes from ?

Regards

Gilbert Vaillancourt
turbolog@videotron.ca

Continue the discussion