Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check that the object exists
Message
 
 
À
05/10/2000 11:46:57
Norman Avila
Universal Computadora Guatemala, S.A.
Guatemala, Guatemala
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00425355
Message ID:
00425396
Vues:
10
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).

>I need to do the following:
>I have a form that has a toolbar associated but I will like to disable a button of the toolbar based on certain conditions, i have the code in the refresh of the form, the problem is that when the form is created the toolbar still does not exists so if i do
>
>oapp.otoolbar.cmdedit.enabled=.f. and error occurs
>how can I check that the object exists before attempting this.?
>
>Thanks all
>
>Norman Avila
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform