GetShortName
PowerScript function
Description
Gets the short name for the current PowerBuilder execution
context.
Applies to
ContextInformation objects
Syntax
1 |
servicereference.GetShortName ( shortname ) |
Argument |
Description |
---|---|
servicereference |
Reference to the ContextInformation service |
shortname |
String into which the function places the short name. |
Return value
Integer.
Returns 1 if the function succeeds and -1 if an error occurs.
Usage
Call this function to determine the current execution environment.
The window plug-in and window ActiveX contexts are obsolete in the current
version of PowerBuilder. For PowerBuilder 2017 applications, the only
value passed for the shortname argument is “PBRun”.
Examples
This example calls the GetShortName function. ci is an instance
variable of type ContextInformation:
1 2 3 4 5 6 7 |
String ls_name this.GetContextService("ContextInformation", ci) ci.GetShortName(ls_name) IF ls_name <> "PBRun" THEN cb_close.visible = FALSE END IF |
See also