Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does project hook know project name?
Message
De
16/01/2002 13:25:13
 
 
À
16/01/2002 11:31:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Divers
Thread ID:
00605429
Message ID:
00605533
Vues:
10
>Hello everyone,
>
>Is there any way for a generic project hook class to know the name of the current project? I would like to know the name of the project in BeforeBuild and AfterBuild, without having to create a specific projecthook class for each project.
>

While the solution you were offered will work most of the time, it is possible for project hook code to fire when the project _isn't_ the active project. A better solution is to add an oProject property to your projecthook subclass, then put this code in the Init method:

This.oProject = _VFP.ActiveProject

As far as I can tell, at the time the Init fires, the project must be the active project.

Once you have the reference, you can use it in all your projecthook code.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform