Visual FoxPro library Post_event.fll
Version: 2.5
Requirements: Visual FoxPro
File Size: 23 KB
License: Free
The library enables POST_EVENT functionality for Visual FoxPro similar to Firebird.
The Post_event function allows Visual FoxPro to broadcast event messages
to interested client applications. An application can register interest in receiving
messages when a specific event occurs. When an application receives an event
message it will call registered for this event function.
The library contains functions:
POST_EVENT,
POST_LOCAL,
LIST_SUBSCR,
SUBSCRIBE,
UNSUBSCRIBE
SUBSCRIBE(cEventName, cCallBackFunctionName)
Registers subscriber for named event.
Parameters:
cEventName
- Specifies the name of the event to register subscriber.
The event name can be a maximum of 64 characters in length.
cCallBackFunctionName
- The parameter can be any Visual FoxPro command or function that
will be executed when the event occurs. Use '' keyword to specify
where event message must be placed. Example: "? " will output a
message to the active screen. The parameter can be a maximum of 64
characters in length.
UNSUBSCRIBE(cEventName)
Unregisters subscriber from the named event.
Parameters:
cEventName
- Specifies the name of the event to unregister from the subscriber.
The event name can be a maximum of 64 characters in length.
LIST_SUBSCR()
Returns the subscription list for named events.
Returns:
- Current list of subscription and callback function names.
POST_EVENT(cEventName, cMessage)
Sends a notification message to the registered subcribers for the named event.
Parameters:
cEventName
- Specifies the name of the event to send notification.
The event name can be a maximum of 64 characters in length.
cMessage
- The message string.
The event name can be a maximum of 300 characters in length.
POST_LOCAL(cEventName, cMessage)
Sends a notification message to registered subcribers for named event.
This function does not use network transport.
Parameters:
cEventName
- Specifies the name of the event to send notification.
The event name can be a maximum of 64 characters in length.
cMessage
- The message string.
The event name can be a maximum of 300 characters in length.
SET LIBRARY TO POST_EVENT.FLL
Subscribe('Test1', 'MessageBox()')
post_event('Test1', 'Test message.')
UnSubscribe('Test1')
SET LIBRARY TO