RestartRequested – PB Docs 126

IPB_Session interface:

RestartRequested method

Description

Determines whether the PowerBuilder system function Restart has
been called.

Syntax

Return Values

pbboolean. Returns true when
the PowerBuilder system function Restart is called.
When RestartRequested returns true,
you should destroy the existing IPB_Session object and
create a new one to restart the application.

Examples

In the following example, StartApplication, RecreateSession,
and CleanApplication are functions of the PB_MyConsoleAppRunner
class. StartApplication is similar to the IP_VM RunApplication function,
but it uses an existing session. RecreateSession releases
the current session and creates a new one. CleanApplication triggers
the application’s Close event and releases resources. In
the example, RestartRequested is called in a DO loop
to test whether the PowerBuilder Restart function
has been called. If it has, the RecreateSession function
is called:

Usage

RestartRequested and HasVisualPBObject are
used in the implementation of the IPB_VM RunApplication function.
You no longer need to use an external message loop to check for
Windows messages when you call the RunApplication function
as you did in versions of PBNI prior to PowerBuilder 10.5.

See Also


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