Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing form from shortcut
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00148464
Message ID:
00148888
Vues:
40
From reading the other messages, I get the feeling this passing objects versus a hierarchy is a hot topic. :) I don't do either, so I don't have an opinion on which is better.

I realize the form will be active while the popup is active. But my popup just calls another program. If during this other program it refers to the active form there could be problems. In my case, it just calls a custom method on the form, and from then on uses the "thisform" reference, so I'm safe there.

>Michelle,
>
>It's perfectly valid design for objects to pass references to themselves to another object. It can be much more flexible and allow for easier designs than forcing everything to always run in some hard coded object hierarchy.
>
>While a popup menu is running you are guaranteed that the form that launched the menu will remain active (unless you've got timers changing active forms) any user action that could occur that would change focus to another form will deactivate the popup.
>
>>My logic is that when you right-click on a form, it will be the active form, so just referring to the active form works for me. If the procedure were more complicated and gave the user a chance to make a different form active in the middle of it, I'd be in trouble.
>>
>>To be honest, I know very little about OOP philosophies. I know enough to know what an object is and how to use one, but that's about it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform