Re: How do you call a process

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Derek Parnell" <ddparnell at bigpond.com>
To: <EUforum at topica.com>
Subject: Re: How do you call a process


> 
> 
> ----- Original Message ----- 
> From: "Ron Austin" <ronaustin at alltel.net>
> To: <EUforum at topica.com>
> Sent: Sunday, October 19, 2003 12:00 PM
> 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()

Ooops. That should be more like ...

    onClick_MenuGetRec(MenuGetRec, w32HClick, "")

 
> Alternatively you can use win32lib to call it thus ....
> 
>   VOID = invokeHandler(MenuGetRec, w32HClick, {})
> 
> -- 
> Derek
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu