Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Timer – PB Docs 2021 – PowerBuilder Library

Timer – PB Docs 2021

Timer

PowerScript event

Description

Occurs when a specified number of seconds elapses after the Start or
Timer function has been called.

Event ID

Event ID

Objects

pbm_timer

Timing or Window

Arguments

None

Return Values

Long.

Return code choices (specify in a RETURN statement):

0 — Continue processing

Examples

These examples show how to use a timing object’s Timer event and a
window’s Timer event.

Using a timing object

This example uses a timing object to refresh a list of customers
retrieved from a database at specified intervals. The main window of the
application, w_main, contains a DataWindow control displaying a list of
customers and two buttons, Start Timer and Retrieve. The window’s Open
event connects to the database:

The following code in the clicked event of the Start Timer button
creates an instance of a timing object, nvo_timer, and opens a response
window to obtain a timing interval. Then, it starts the timer with the
specified interval:

In the timing object’s Constructor event, the following code creates
an instance of a datastore:

The timing object’s Timer event calls an object-level function
called refresh_custlist that refreshes the datastore. This is the code for
refresh_custlist:

The Retrieve button on w_main simply shares the data from the
DataStore with the DataWindow control:

Using a window object

This example causes the current time to be displayed in a StaticText
control in a window. Calling Timer in the window’s Open event script
starts the timer. The script for the Timer event refreshes the displayed
time.

In the window’s Open event script, this code displays the time
initially and starts the timer:

In the window’s Timer event, which is triggered every minute, this
code displays the current time in the StaticText st_time:

See also

Start

Timer


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x