Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Property value as a string
Message
From
21/09/2002 09:35:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00703045
Message ID:
00703048
Views:
11
>Hi.
>I am trying to get the property 'Value' as a string so that I can subsequently macro expand it .
>
>I have on my base classes a property set up called MyProp and typically I might have in this:
>
>Balnace = 500
>Price > 100
>Country = 'IRL'
>.T.
>
>I then want to take this property into a variable as a string and mix it with some other code , and then macro expand it .
>
>If I do :
>
>MyString = MyTextBox.MyProp I cannt then do MyNewsting='abc' + space(1) + Mystirng because if , for istance, MyProp was = .t., it is treated a a logical variable. In this case, I want to get the String--> .T. into another field reather than the logical .T.
>
>
>(I know I can always surround the property with quotes and then remove the quotes, but I want to avoid this if possibel)
>
>
>Any syggestions ?
>
>Regards,
>
>Gerard

Gerard,
Use transform() to convert them to string representations.
PS: Think twice before using macro expansion. Evaluate() might be what you need.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform