Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coding issue 1

Status
Not open for further replies.

tforr

Programmer
Aug 14, 2003
181
GB
Hi,

can anyone help explain line by line in english what is code below is trying to do.

&& frmPurchaseProcessing.OpnePostings(tcMode)
LOCAL llRetVal
ThisForm.MySetupStuff()
llRetVal = DODEFAULT(tcMode)
IF llRetVal
ThisForm.Edit()
ThisForm.MyUpdateStuff()
ThisForm.Save()
ENDIF && llRetVal

Thanks and kind regards,

Tom
 
Tom,
The explanations follow the line of code:
&& frmPurchaseProcessing.OpenPostings(tcMode)
[red] a comment - no code [/red]
LOCAL llRetVal
[red] declaration of a local variable [/red]
ThisForm.MySetupStuff()
[red] call to a user defined method created on this form[/red]
llRetVal = DODEFAULT(tcMode)
[red] call to the parent class with the parameter passed to this method - returns a logical value that indicates sucess or failure[/red]
IF llRetVal
[red] if the parent class code finished sucessfully continue [/red]
ThisForm.Edit()
[red] call to a user defined method created on this form[/red]
ThisForm.MyUpdateStuff()
[red] call to a user defined method created on this form[/red]
ThisForm.Save()
[red] call to a user defined method created on this form[/red]
ENDIF && llRetVal
[red] end of conditional execution[/red]

Rick
 
Thanks Rick, well documented.

Tom
 
So how would I go about writing a method for ThisForm.Save()

Tom
 
To write, it's just like any other method code - it depends on what you want to do.

If you are asking how do you create a user method, there are at least two ways in the form designer. (Start with the form open and selected.)
1) In the Menu, choose Form -> New Method ..., then fill in the method name.
2) In the Menu, choose Form -> Edit Proprty / Method..., and then click the New Method command button.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top