NewEra 3.1 ixVariant and OCX
Posted in 1997
Posting for someone on our project I'm trying to help out. Anybody with experience using ixVariant ... ? OCX control used: MSComm32.ocx The above OCX is used for serial port communications. Most of the properties for this OCX are simple data types (ixSmallint, ixString). However, the property used to output data to the com ports is of type VARIANT. The following example serves to show the problem: VARIABLE ocxControl ixOCXField VARIABLE i SMALLINT VARIABLE iPos SMALLINT VARIABLE strOutput ixString = NEW ixString("") VARIABLE vectOutput ixVector VARIABLE varntOutput ixVariant . . LET ocxControl = mainWindow.ocxCommControl CALL strOutput.setValueStr("This string could be of any length") . . LET vectOutput = NEW ixVector(?) LET iPos = vectOutput.insert(NEW ix??(??), 1) LET iPos = vectOutput.insert(NEW ix??(??), 2) " " " " " " " " . . LET varntOutput = NEW ixVariant(value:strOutput, safeArray:vectOutput) LET i = ocxControl.setProperty("Output", varntOutput) . . Obviously, the safeArray member expects an ixVector object, but how are the elements of the ixVector object determined? What values are used to populate the ixVector object, and in what order? //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer