Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logical field in grid not showing Yes/No instead T/F
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01216898
Message ID:
01216957
Views:
22
>Ok, just thought of something, I stuck a checkbox so I don't have to deal with the yes and no's. The problem is I'm creating my grid programmatically, and sometimes I'm getting errors when adding and removing the objects as shown below:
>
>.Column6.RemoveObject('Text1')
>.Column6.NewObject("Check1", "CheckBox")
>
>because the objects already exist. Is there a way to test if an object exist before removeobject or newobject?
>
>thanks
>Nick
>

Yes, use
type('column6.text1.name') = 'C'
See also GETPEM to check for CurrentControl.

You can also put this code in try/catch block.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform