IPB_Session interface:
IsGlobalVarObject method
Description
Returns true if the global variable contains
an object; otherwise it returns false.
Syntax
|
1 |
IsGlobalVarObject( pbfield <span>fid</span>) |
|
Argument |
Description |
|---|---|
|
fid |
The field ID of the global variable |
Return Values
pbboolean.
Examples
These statements test whether the field identified
by fid is a global variable object. If it is,
its value is set to another global variable object:
|
1 |
fid = session -> GetGlobalVarID("obj2_gvar");<br>   if (session -> <span>IsGlobalVarObject</span>(fid))<br>   {<br>      obj_val = session -> GetObjectGlobalVar(fid,<br>         isNull);<br>      cls = session -> GetClass(obj_val);<br>      fid = session -> GetFieldID(cls, "text");<br>      s_val = session -> GetStringField(obj_val, fid,<br>         isNull);<br>      mystr = session -> GetString(s_val);<br>      // Set the value of obj2_gvar to obj1_gvar<br>      fid = session -> GetGlobalVarID("obj1_gvar");<br>      session -> SetObjectGlobalVar(fid, obj_val);<br>   } |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest