11.07.2015 Views

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

On UNIX platforms for ActiveX controls:0 Success.-1 Failure.Descriptionsm_com_call_method calls methods that are part of COM components' inter faces.Usage of this function is no longer recommended; use sm_obj_call instead to ensurecomponent portability.To find which methods are available, refer to the documentation supplied with theCOM component, use the Panther Axview utility, or use the View→ComponentInterface in the editor for service components.This function returns a string; the COM component itself can return different types ofdata.If you get a “type mismatch” error, refer to the component documentation and checkthat all the parameters are of the correct type. @obj may be needed if any of theparameters must be passed as objects.Example// This C function calls the InsertNode method of the// ActiveX treeview control.char method[100];char *parent;char *child;int id;id = sm_prop_id ( "treeview" );sprintf( method, "InsertNode(%s, \"Child node\"", parent) );child = sm_com_call_method( id, method );// This is the JPL call for this method. Single quotation// marks are used surrounding the method in order to pass// double quotation marks to the method itself.vars parentvars childchild = sm_com_call_method \( treeview->id, "InsertNode", :parent, "Child node")// These JPL procedures instantiate the cCustomers COM// component and call its GetCustomer method.vars id<strong>Upgrade</strong> <strong>Guide</strong> C-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!