Anonymous user
Character Mode Cookbook: Difference between revisions
no edit summary
(New page: on_key KCLEAR : F5 on_key KCANCEL Send Cancel : Esc on_key KENTER : Enter on_key KSAVE_RECORD Send Do_Report : F2 Promt commands df32 dfc...) |
No edit summary |
||
Line 1: | Line 1: | ||
on_key KCLEAR : F5 | on_key KCLEAR : F5 | ||
on_key KCANCEL Send Cancel : Esc | on_key KCANCEL Send Cancel : Esc | ||
on_key KENTER : Enter | on_key KENTER : Enter | ||
on_key KSAVE_RECORD Send Do_Report : F2 | on_key KSAVE_RECORD Send Do_Report : F2 | ||
Promt commands | Promt commands | ||
df32 | df32 | ||
dfcomp ex.src -pfv1 p=precompile | dfcomp ex.src -pfv1 p=precompile | ||
dfcomp ex.src -fv1 fv1 creates prn-file (check errors) | dfcomp ex.src -fv1 fv1 creates prn-file (check errors) | ||
dfrun ex | dfrun ex | ||
dfruncon ex with mouse support | dfruncon ex with mouse support | ||
Move (key+1) to key key = key++ //Dont forget to use paratheses (a+(b*c))<>a+b*c | Move (key+1) to key key = key++ //Dont forget to use paratheses (a+(b*c))<>a+b*c | ||
Set value of (oPop(current_object)) item 0 to sVar // item[0] = sVar | Set value of (oPop(current_object)) item 0 to sVar // item[0] = sVar | ||
Get Value item 0 to sVar // sVar = item[0] | Get Value item 0 to sVar // sVar = item[0] | ||
Set A to B A=B | Set A to B A=B | ||
Get A to B B=A | Get A to B B=A | ||
get myFunc of (oObj(current_object)) "tmp" to sAnswer // sAnswer = oObj->myFunc("tmp") | get myFunc of (oObj(current_object)) "tmp" to sAnswer // sAnswer = oObj->myFunc("tmp") | ||
-------------- | -------------- | ||
SET | SET | ||
value of OBJ ITEM to VAL | value of OBJ ITEM to VAL | ||
location X Y [ABSOLUTE/RELATIVE] | location X Y [ABSOLUTE/RELATIVE] | ||
focus_mode to POINTER_ONLY | focus_mode to POINTER_ONLY | ||
-------------- | -------------- | ||
Procedure MyProcedure | Procedure MyProcedure | ||
End_Procedure | End_Procedure | ||
Send MyProcedure | Send MyProcedure | ||
------------------ | ------------------ | ||
Procedure DisplayResult String lsValue1 String lsValue2 String lsValue3 | Procedure DisplayResult String lsValue1 String lsValue2 String lsValue3 | ||
set value of (oOutput(self)) item 0 to lsValue1 | set value of (oOutput(self)) item 0 to lsValue1 | ||
set value of (oOutput(self)) item 1 to lsValue2 | set value of (oOutput(self)) item 1 to lsValue2 | ||
set value of (oOutput(self)) item 2 to lsValue3 | set value of (oOutput(self)) item 2 to lsValue3 | ||
end_procedure | end_procedure | ||
send DisplayResult lsValue1 "" "" | send DisplayResult lsValue1 "" "" | ||
-------------- | -------------- | ||
Procedure_Section // used in reports to handle paging in a smarter way | Procedure_Section // used in reports to handle paging in a smarter way | ||
-------------- | -------------- | ||
Function MyFunction integer i returns Integer | Function MyFunction integer i returns Integer | ||
End_Function | End_Function | ||
get MyFunction(self) as iRet | get MyFunction(self) as iRet | ||
-------------- | -------------- | ||
function myFunc string test returns string | function myFunc string test returns string | ||
local string lsRval | local string lsRval | ||
move test to lsRval | move test to lsRval | ||
function_return lsRval | function_return lsRval | ||
end_function | end_function | ||
get myFunc of (oObj(current_object)) "tmp string" to sAnswer | get myFunc of (oObj(current_object)) "tmp string" to sAnswer | ||
-------------- | -------------- | ||
start_ui // starts a new console | start_ui // starts a new console | ||
ui_accept // has a return value | ui_accept // has a return value | ||
activate_scope // opens a new "window" | activate_scope // opens a new "window" | ||
-------------- | -------------- | ||
/Answer.hdr | /Answer.hdr | ||
+--------------------+ | +--------------------+ | ||
/Answer.dat | /Answer.dat | ||
¦ Answer:_________ ¦ | ¦ Answer:_________ ¦ | ||
+--------------------+ | +--------------------+ | ||
/* | /* | ||
register_object oAnswer | register_object oAnswer | ||
Object oAnswer is a Client Answer.hdr | Object oAnswer is a Client Answer.hdr | ||
Set location 7 30 ABSOLUTE | |||
On_Key kcancel Send cancel | |||
Object oAnswData is a Form Answer.dat | Object oAnswData is a Form Answer.dat | ||
Line 87: | Line 87: | ||
End_Procedure | End_Procedure | ||
End_Object | End_Object | ||
Send OpenAnswerForm to (oAnswer(current_object)) "test string" | Send OpenAnswerForm to (oAnswer(current_object)) "test string" | ||
-------------- | -------------- | ||
/oReportView1.SectionName | /oReportView1.SectionName | ||
__________________________________________________________________________ | |||
/oReportView1.body | /oReportView1.body | ||
____________________ ______________________ | ____________________ ______________________ | ||
/* | /* | ||
//Activate_View Activate_Report1 for oReportView | //Activate_View Activate_Report1 for oReportView | ||
Object oReportView1 is a Report_View NO_IMAGE | Object oReportView1 is a Report_View NO_IMAGE | ||
Object oMainReport is a seq.Report NO_IMAGE | Object oMainReport is a seq.Report NO_IMAGE | ||
Line 143: | Line 143: | ||
send run_report to (oMainReport(self)) | send run_report to (oMainReport(self)) | ||
End_Procedure | End_Procedure | ||
End_Object | End_Object | ||
procedure Activate_Report_View_1 | procedure Activate_Report_View_1 | ||
send run_report to (oReportView1(self)) | send run_report to (oReportView1(self)) | ||
end_procedure | end_procedure | ||
--------------------------------------------------------------- | --------------------------------------------------------------- | ||
Object oOrder is a Entry_View_Client oOrder.hdr | Object oOrder is a Entry_View_Client oOrder.hdr | ||
Set location 5 8 ABSOLUTE | Set location 5 8 ABSOLUTE | ||
Line 195: | Line 195: | ||
End_Object | End_Object | ||
End_Object | End_Object |