Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the point?
Message
From
30/05/2003 12:40:23
 
 
To
30/05/2003 03:46:32
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00794178
Message ID:
00794583
Views:
15
Hi Walter,
FWIW I agree with you as far as the localization goes.

I do like .h files for parameters/arguments. I use the messagebox parameters constantly. I hate remembering that the "Yes/No" button option is ?, but I have no problem remembering "mb_YN". Do you have an argument with that usage? Or maybe another way to accomplish the same thing?


>Hi bill,
>
>I seldom use .H files. And if you'd ask me, I'd really like get rid of them: They're a pain in the butt. You'll alway have to be sure the right .H file is attached to your class, program or form.
>
>I don't buy the localization argument. You can only use them in code. There are lots of places where you can't use DEFINE constants:
>
>1. In reports
>2. As a property of an object
>3. Database field captions
>4. Menubars
>5. etc.
>
>Personally I use a GetCaption("MY_STRING_IDENTIFIER") function to retrieve a localized string from a localization table in which the MY_STRING_IDENTIFIER is the key in the table and the rest of the columns contain the localized string for each language. To add a language, add a column. No recompile, you can switch languages while the app runs.
>
>However there are cases where you want to use .H files provided by external components. When working with MSWORD, EXCEL, or other third party .COM libraries or ActiveX. For the most part they contain number DEFINE's. Sometimes, I find it more usefile to pick out the DEFINE's from the header file and use them where I need them, because I only need it in one place. In the case of WORD automation, I might need the definitions in more than one procedure and therefore will use the generic .H file.
>
>Just my € 0,02
>
>Walter,
>
>
>
>>I'm just exploring some of VFP's foundation classes. I ran across this:
>>
>>
>>In app.h is this:
>>#DEFINE ERROR_IN_ERROR_METHOD_LOC    "Error in error handler"
>>
>>As far as I can find it's only used in one place in _error class.
>>
>>What's the point of defining something in an include file that only gets used once?
>>
>>
>>Assuming that they put it there so that it's available to me, how would I ever enen know that it's there? If I'm subclassing a foundation class, I'm not going to study every line of code in it to see what's available.
>>
>>TIA
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform