IsNativeObject
Description
Determines whether a pbobject is an instance of a native
class.
Syntax
|
1 |
IsNativeObject(pbobject obj) |
|
Argument |
Description |
|---|---|
|
obj |
A valid object handle |
Return value
pbboolean.
Examples
The f_getrow function uses IsNativeObject to test whether extObj
is a native class. If so, it gets the native interface and invokes the
f_getrowcount function in the other class:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
long f_getrow(IPB_Session* session, pbobject dwObj, pbobject extObj) { long lRet; Imy_pbni* pImy_pbni = NULL; IPBX_NonVisualObject* pp=NULL; if (session -> IsNativeObject(extObj) ) { pp = (IPBX_NonVisualObject*) session -> GetNativeInterface(extObj); pImy_pbni = static_cast<Imy_pbni*>(pp); lRet = pImy_pbni-> f_GetRowCount(session, dwObj); } return lRet; } |
Usage
Use this method in conjunction with GetNativeInterface to obtain a
direct reference to the IPBX_UserObject associated with another native
class, so that the class and its methods can be accessed
directly.
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest