GetShortName PowerScript function
Description
Gets the short name for the current PowerBuilder execution
context.
Controls
ContextInformation objects
Syntax
|
1 |
<span>servicereference</span>.<span>GetShortName</span> ( <span>shortname</span> ) |
|
Argument |
Description |
|---|---|
|
servicereference |
Reference to the ContextInformation service |
|
shortname |
String into which the function places |
Return Values
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 12 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 |
String ls_name |
|
1 |
|
1 |
this.GetContextService("ContextInformation", ci) |
|
1 |
ci.<span>GetShortName</span>(ls_name) |
|
1 |
IF ls_name <> "PBRun" THEN |
|
1 |
   cb_close.visible = FALSE |
|
1 |
END IF |
See Also
-
GetCompanyName, GetContextService, GetFixesVersion, GetHostObject, GetMajorVersion, GetMinorVersion, GetName, GetVersionName