110 likes | 257 Views
Ole4D Plug-in presentation. Author: CLS Data Pro http://www.clsdatapro.com mailto:support@clsdatapro.com. Ole4D overview. What is Ole4D? B ridge between 4D enviroment and ActiveX/Ole objects Embeds ActiveX/Ole objects in a 4D form. Introducing ActiveX Controls.
E N D
Ole4D Plug-in presentation Author: CLS Data Pro http://www.clsdatapro.com mailto:support@clsdatapro.com
Ole4D overview • What is Ole4D? • Bridge between 4D enviroment andActiveX/Ole objects • Embeds ActiveX/Ole objects in a 4D form
Introducing ActiveX Controls • ActiveX controls are reusable software components • Can quickly add specialized functionality to applications • Are based on an architecture for developing programmable software components • ActiveX controls are small, fast, and powerful, and make it easy to integrate and reuse software components
Ole4D Plug-in 4th Dimension Application ActiveX/Ole Object Ole4D methods Calls to the object functions 4D events/notifications Calls to the plug-in functions Plug-in API calls OLE specifications 4D plug-in API How Ole4D works
Communication between 4D and ActiveX/Ole • 4D methods calls and notifications are dispatched to the Ole objectby the plug-in • When an event occurs the Ole object notifies the plug-in to call the 4D method associated to the event, if any
How comunication works • Interaction between the plug-in and the Ole object is defined by the OLE specifications • 4D and the plug-in comunicate using 4D plug-in API
4D Enviroment Ole4D plug-in ActiveX/Ole Object Read a property of the Ole object by calling OCGetLongProperty Call IDispatch:Invoke to retrieve the value of the property 4D Plug-in API Ole Interfaces Example
Plug-in features • Create and embed OLE objects • Allow in place activation saving the object to blob • Positioning of the OLE object toolbar • Assign 4D functions as event handlers for OLE object events, providing access to parameters • Enable/disable showing ole object menu • Run VB Script from 4D using an interpreter • Retrieve value of VB Script variables in 4D create OLE objects linked to a file
Adding special functionality to a 4D application • Use a plug-in designed only for that feature • Use the Ole4D plug-in
Why use Ole4D ? • 1. ActiveX/Ole objects are widelly available • There are a lot of ActiveX objects installed by Windows that can be used to access OS features • Many applications have a corresponding ActiveX/Ole object that can be included using the plug-in in a 4th Dimension form • Due to the large market, the ActiveX/Ole objects usually have low costs
Why use Ole4D ? 2. Other development advantages • There are ActiveX/Ole objects for solving a wide range of problems • Saves development effort for a custom plug-in • Control applications from 4D environment