Re: How do you call a process
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 20, 2003
- 442 views
----- Original Message ----- From: "Ron Austin" <ronaustin at alltel.net> To: <EUforum at topica.com> Subject: How do you call a process > > > In one part of the program I wrote a procedure to read a record out of my > database.=0D > =0D > procedure onClick_MenuGetRec(integer self, integer even, sequence parms)= > =0D > err =3D db_open("Eye-Comp",DB_LOCK_NO)=0D > err =3D db_select_table("Diagnosis")=0D > key =3D db_find_key(getText(Code))=0D > if key >0 then=0D > setText(Code,db_record_key(key))=0D > setText(Desc,db_record_data(key))=0D > else=0D > setText(Desc,"** Code Not Found ***")=0D > end if =0D > db_close()=0D > end procedure=0D > setHandler({ MenuGetRec, ToolGetRec}, w32HClick, routine_id(=20 > onClick_MenuGetRec" ))=0D > =0D > In another part of the program I want to do the same thing. I tried to use= > > call_proc(onClick_MenuGetRec,{}) but I get the following error:=0D > =0D > Syntax error - expected to see an expression, not a procedure=0D > =0D > =0D The simplest way is to just call it as a normal Euphoria routine ... onClick_MenuGetRec() Alternatively you can use win32lib to call it thus .... VOID = invokeHandler(MenuGetRec, w32HClick, {}) -- Derek