Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyway to avoid this Macro Substitution
Message
De
25/11/2005 09:16:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01072057
Message ID:
01072060
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>I have a form containing multiple Business Objects classes. This form also contains a container, which in turn contains a command button. The container has a property which contains the name of the BO with which it is supposed to deal. The property is populated at Design Time and will stay constant for this container and it's contained object. This is my code, can I avoid the macro substitution I have to do?
>
>
LOCAL lcBO
>
>lcBO = THIS.PARENT.cBOName
>
>
>* Confirm the changes
>IF THISFORM.&lcBO..lConfirmOnDelete ;
>		AND (goApp.DisplayMessage("VSO_DeleteRec") = MSGNO)
>		
>	* User did not confirm the deletion
>	RETURN
>ENDIF
>
>
>THISFORM.&lcBO..DELETE()
>
>Please advise.
>
>
>Update: I have a typo in the title I meant avoid rather than void.
With Evaluate('thisform.'+This.Parent.cBOName)

  * Confirm the changes
  If .lConfirmOnDelete ;
      AND (goApp.DisplayMessage("VSO_DeleteRec") = MSGNO)

    * User did not confirm the deletion
    Return
  Endif


  .Delete()
Endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform