Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - How do you call a CLICK EVENT from a Menu option
Message
De
22/04/1997 14:57:26
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
 
À
22/04/1997 14:49:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00029293
Message ID:
00029304
Vues:
29
>>>
>>> How do you call a CLICK EVENT from a Menu option?
>>> At the beginning of my program, I may need to run an
>>> option off the menu...
>>
>>IMHO, CLICK events shouldn't be called by a menu.
>>
>>If you need to do it, make sure that the object can either be referenced
>>by a property of your application object (oApp.myform) , OR make the
>>object PUBLIC (PUBLIC goMyForm). Then you can just call it
>>oApp.myform.cmdbutton.click()
>>
>>However, again IMHO, if the function called by the click is needed
>>outside the form, perhaps you should put the function in a procedure
>>file (eg. myProcs.prg) and SET PROCEDURE TO myProcs. Then you can call
>>the procedure either from the menu or the click event. (FYI, although
>>slightly less convenient, procedures run a little faster than object
>>methods)
>>--
>>Matt McDonnell
>>
>>Conventional Wisdom - "If it ain't broke, don't fix it."
>>Gates Wisdom - "If it doesn't work, sell it, and fix it later."
>
>Hi Matt... What I am trying to do is to call a SET DATA PATH FORM that
>is called off the MAIN MENU. If this is a new install, the SET DATA PATH FORM needs to be called at load time. I thought I would call it from the MAIN MENU. What do you think?

If I understand what you're doing, here's one way...

In the table? where your storing the path info, also have a flag which identifies if this is a new installation. Use your main application object to run a routine to check for the flag an if true, call that form before anything else is executed. You might also consider using a system flag as a property of the oApp which if true diables all functionality until the data path is set.

Does that help?
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform