Reverse-engineering a PowerBuilder target – PB Docs 126
Reverse-engineering a PowerBuilder target Reverse-engineering is the process of examining and recovering data or source code that is then used to build or update an OOM. You can reverse-engineer PowerBuilder objects to obtain a diagram of the class structure of those objects. The Reverse Engineer dialog box After you enable the PowerDesigner plug-in, the Reverse…
Creating new objects – PB Docs 126
Creating new objects To create new objects, you use the New dialog box. To create a new object: Do one of the following: Click the New button in the PowerBar. Select File>New from the menu bar. On the Workspace tab of the System Tree, right-click on a workspace or target name and select New from…
Optimizing libraries – PB Docs 126
Optimizing libraries You should optimize your libraries regularly. Optimizing removes gaps in libraries and defragments the storage of objects, thus improving performance. Optimizing affects only layout on disk; it does not affect the contents of the objects. Objects are not recompiled when you optimize a library. Once a week For the best performance, you should…
Modifying Script view properties – PB Docs 126
Modifying Script view properties The Script view automatically: Color-codes scripts to identify datatypes, system-level functions, flow–of–control statements, comments, and literals Indents the script based on flow-of-control statements You can modify these and other properties. Some properties are shared Some properties you specify for the Script view also affect the file editor, Source editor, Debugger, and…
Naming conventions – PB Docs 126
Naming conventions As you use PowerBuilder to develop your application, you create many different components that require names. These components include objects such as windows and menus, controls that go into your windows, and variables for your event and function scripts. You should devise a set of naming conventions and follow them throughout your project….
Comparing PBNI and JNI – PB Docs 126
Comparing PBNI and JNI If you have used the Java Native Interface (JNI), which allows Java applications and C and C++ modules to interoperate, you might find it helpful to be aware of the similarities in the two interfaces and the differences between them. The IPB_VM interface in PBNI is analogous to the JavaVM type,…
PBX_Notify – PB Docs 126
Exported methods: PBX_Notify method Description Used to initialize and uninitialize a session. Syntax
|
1 |
PBXEXPORT PBXRESULT PBXCALL PBX_Notify(IPB_Session* <span>pbsession</span>,   pbint <span>reasonForCall</span>) |
Return Values PBXRESULT Examples This sample shows code that exports PBX_Notify and displays a message box after the PBX is loaded and before it is unloaded:
|
1 |
PBXEXPORT PBXRESULT PBXCALL PBX_Notify<br>(<br>   IPB_Session*   pbsession,<br>   pbint          reasonForCall<br>)<br>{<br>   switch(reasonForCall)<br>   {<br>   case kAfterDllLoaded:<br>      MessageBox(NULL, "After PBX loading", "",<br>          MB_OK);<br>      break;<br>   case kBeforeDllUnloaded:<br>      MessageBox(NULL, "Before PBX unloading", "",<br>          MB_OK);<br>      break;<br>   }<br>   return PBX_OK;<br>} |
Usage If PBX_NOTIFY is exported, the PBVM calls PBX_Notify immediately after an extension PBX…
SetProp – PB Docs 126
IPB_Session interface: SetProp method Description Adds a new variable to the list of properties of the current session or changes the value of an existing variable. Syntax
|
1 |
SetProp(LPCTSTR <span>name</span>, void* <span>data</span>) |
Argument Description name The name of the property to be set data A pointer to the data buffer where the variable’s value resides Return Values None. Examples…
SetToNull – PB Docs 126
IPB_Value interface: SetToNull method Description Sets the data contained in the IPB_Value instance to null so the data can be reset. Syntax
|
1 |
SetToNull( ) |
Return Values PBXRESULT. If the value is a read-only argument, the error PBX_E_READONLY_ARGS is returned. Examples This example shows the use of SetToNull when a null blob value is returned:
|
1 |
case pbvalue_blob:<br>   pStr=(LPCTSTR)Session-> GetBlob(retVal.blob_val); <br>   if (strncmp(pStr, "null", 4)==0 )<br>      ci->returnValue-><span>SetToNull</span>();<br>   else<br>      ci->returnValue->SetBlob(retVal.blob_val);<br>    break;<br>... |
See…
IPBX_VisualObject interface – PB Docs 126
IPBX_VisualObject interface Description The IPBX_VisualObject interface inherits from IPBX_UserObject and is the direct ancestor class of visual PowerBuilder native classes. Methods IPBX_VisualObject has three direct methods: CreateControl GetEventID GetWindowClassName. IPBX_NonVisualObject inherits two methods from the IPBX_UserObject interface: DestroyInvoke Document get from Powerbuilder help Thank you for watching.