Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using #define constants in Label caption??
Message
From
11/04/1998 17:23:31
 
 
To
11/04/1998 15:35:33
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00091334
Message ID:
00091343
Views:
27
>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>
>
>The code generated for the class looks like this:
>
>
>**************************************************
>*-- Class: bizsystab (c:\vfe5\samples\massone\libs\abizness.vcx)
>*-- ParentClass: vbizobj (c:\vfe5\common30\libs\vbizness.vcx)
>*-- BaseClass: container
>*
>#INCLUDE "c:\vfe5\samples\massone\include\rsapincl.h"
>*
>DEFINE CLASS bizsystab AS vbizobj
>
><snip>
>
> ADD OBJECT label3 AS label WITH ;
> Caption = (hcRSAPINCLTEST), ;
> Height = 25, ;
> Left = 385, ;
> Top = 361, ;
> Width = 204, ;
> Name = "Label3"
>
><snip>
>
> PROCEDURE Init
> #include ..\INCLUDE\RSAPINCL.H
>
> if dodefault()
> wait window "RSAPINCL.H: " + hcRSAPINCLTEST
> wait window "RODESOFT.H: " + hcRODESOFTTEST
> wait window "STRXINCL.H: " + hcSTRXINCLTEST
> wait window "APPINCL.H: " + DEBUGMODEFILE
> endif
>
>
>When I build and run, the caption is blank. But the same define
>constant works fine when I include it in a WAIT WINDOW command
>in the Init method. All of the WAIT WINDOW tests work correctly.
>However I note that the Init() code would not compile without
>an explicit #include statement.
>
>So perhaps my question should be:
>
> What do I need to do to activate the #INCLUDE command for
>code in a business object class?
>
>
>Thanks for any suggestions.
>
>
>Peter Robinson

If you define class in programm code it's working.
In VCX, SCX - not. May be BUG ???

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

Alexander Grigorjev.
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform