Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in .FontCharset
Message
From
05/06/2005 20:08:03
 
 
To
05/06/2005 19:10:22
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01020365
Message ID:
01020368
Views:
19
>Hello,
>
>I have reported this bug when VFP 9 was in beta. I don't know what is the percent of non-english VFP developers, but I'd suggest to not ignore us.
>
>Repro code:
>
>
>oTxt = CreateObject("MySecondTxt")
>? oTxt.FontCharset
>
>Define Class MyTxt As TextBox
>FontCharSet = 238
>EndDefine
>
>Define Class MySecondTxt As MyTxt
>Enddefine
>
>
>
>The value returned is 1, not 238. Come on, guys. 1 is OS default. I am specifying 238 with a specific goal: to avoid OS default. Now what? I have to set it in every subclass and every instance? Copy and paste like VB's OOP?

Hi Grigore,
VFP written the value into the class template,
but reset it to 1 when it create the object.
Only solution:
- set on textbox Init class
CLEAR

oTxt = CreateObject("MyTxt")
? oTxt.FontCharset
oTxt.FontCharset = 238
? oTxt.FontCharset

Define Class MyTxt As TextBox
	* check the class template setting
	FontCharSet = MESSAGEBOX(M.THIS.FontCharSet)-1	&& REMEMBER MESSAGEBOX RETURN 1
	FontCharSet = MESSAGEBOX(M.THIS.FontCharSet) + 237
	FontCharSet = MESSAGEBOX(M.THIS.FontCharSet)
	
ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform