Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entering numeric-like text in class property
Message
From
21/09/2006 22:39:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01156255
Message ID:
01156256
Views:
13
This message has been marked as the solution to the initial question of the thread.
>I want to enter a string that looks like a number such as 1.0 in a class property "version". If I enter it as 1.0 (without quotes) the class treats it as a numeric so I have to do str(obj.version) to get it to text. But then I may need "1.0" so I need str(obj.version,3,1)... or I might need "1" so str(obj.version,3,1) won't work. I can enter "1.0" in the class property but then sometext="Version: " + obj.version shows 'Version: "1.0"' What is the best way around this? Do I have to enter it as "1.0" in the class then strtran the quotes out whenever I need it?

I suppose you mean "in the property sheet", for in code, you don't have these problems.

Just set the property, in the property sheet, to:
= "1.0"
including the equal sign in front.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform