| WideStudio Application Builder User's Guide | WideStudio Index Table of contents

> ## What is the Event procedure?

> The event procedure is used when an event is fired. This happens when the task is too difficult to realize within the object. You can code an event procedure with usual knowledge of the C++ language.
> It has a trigger and a client instance, and is executed when the trigger is fired on the client. See the Programming Guide. The following shows what the event procedure has.
> - Name
>   An instance has many event procedures, so they have their names to identify them.
> - C++ function
>   The event procedure has a function which is coded in the c++ language. The function is executed if the event is fired.
> - Trigger
>   The event procedure waits for the event on the client instance. If the event is fired, it executes its function.

> [The event procedure]

> ### The function for the event procedures

> The function has one parameter in which a pointer to the client object is passed. The following function is a template generated by the application.

>     #include <WScom.h>
>     #include <WSCfunctionList.h>
>     #include <WSCbase.h>

>     //----------------------------------------------------------
>     //Function for the event procedure
>     //----------------------------------------------------------
>     void sample(WSCbase* object){
>       //do something...

>     }
>     static WSCfunctionRegister  op("sample",(void*)sample);

Document Release 3.70 for WideStudio ver 3.70, May 2004

WideStudio documents index | Table of contents

Copyright(C) WideStudio Development Team, 1999-2004 | Last modified: May 25, 2004