Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using #define constants in Label caption??
Message
From
12/04/1998 13:38:12
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
11/04/1998 17:23:31
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00091334
Message ID:
00091383
Views:
25
>>Question: Can one place a #define constant in a caption?
>>
>>In the caption property of Label3 I entered:
>>
>> =hcRSAPINCLTEST
>>
>>The include file looks like this:
>> * RSAPINCL.H VERSION && 19980410
>> * Header file containing DEFINE statements for the MassOne Application
>> #define hcRSAPINCLTEST "RSAPINCL.H TEST"
>> <snip>
>>
>> What do I need to do to activate the #INCLUDE command for
>>code in a business object class?

You'd probably have to persuade Microsoft to remake VFP to compile methods before properties, and to scope the #defines to properties, too. I think the code is compiled separately for properties and separately for methods. I've tried the same trick once and came up with setting the captions in the form's (or label's) .init(), using the #defined constants there.

>One way for VCX, SCX: setting Label3.Caption = (...) in Init() method,
>must operate.

No need for parentheses if you have a constant - though VFP puts them for variables or expressions, just to make sure they're taken by value.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform