PostEvent

Description

Adds an event to the end of the event queue of an object.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

boolean objectname.PostEvent ( TrigEvent event, { long word, long long } ) 

boolean objectname.PostEvent ( TrigEvent event, { long word, string long } ) 

Argument

Description

objectname

The name of any PowerBuilder object or control (except an application) that has events associated with it.

event

A value of the TrigEvent enumerated datatype that identifies a PowerBuilder event (for example, Clicked!, Modified!, or DoubleClicked!) or a string whose value is the name of an event. The event must be a valid event for objectname and a script must exist for the event in objectname.

word (optional)

A value to be stored in the WordParm property of the system’s Message object. If you want to specify a value for long, but not for word, enter 0. (For cross-platform compatibility, WordParm and LongParm are both longs.)

long (optional)

A value that you want to store in the LongParm property of the system’s Message object. When you specify a string, a pointer to the string is stored in the LongParm property, which you can access with the String function (see Usage).

Returns

Returns true if it is successful and false if the event is not a valid event for objectname or no script exists for the event in objectname.

If any argument’s value is null, PostEvent returns null.

Usage

Inherited from PowerObject. For information, see PostEvent in the PowerScript Reference.