Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check that the object exists
Message
From
05/10/2000 13:53:25
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00425355
Message ID:
00425429
Views:
11
>>If you're sure oApp object exist, you can you more quick way that 'type' function:
>>IF PEMSTATUS(oapp,'otoolbar',5)
>> oapp.otoolbar.cmdedit.enabled=.f.
>>ENDIF
>> (suggested that you need to ckeck for toolbar, not a button that is part of toolbar).
>
>Not to be a PITA but, in addition to the above, you should check whether otoolbar is an object using PEMSTATUS(oapp,'otoolbar',3). If not, otoolbar could be a property, in which case the Enabled setting would throw an error.

I sent similar note to Brainbench tests feedback for their test related to PEMStatus, but seems it is not so important. Just because you usually know exactly in your application that oToolbar cannot be something other than object ;)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform