Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyway to avoid this Macro Substitution
Message
From
25/11/2005 09:16:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01072057
Message ID:
01072060
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform