From: Jean-Pierre D. <jea...@tr...> - 2005-05-19 15:00:48
|
I'm currently facing the problem of writing/reading objects to/from INI files. In the file each object data is stored in a separate section named [Classname::ObjectID] (the classname is to easily identify all objects of a given class in a file). An object refnum key holds the ObjectID ObjectRef=ObjectID I'd like to modify OGTK Read Key (Variant) and Write Key (Variant) so that it identifes GOOP refnums (refnum to a file of enum data), get the variant object data and write it as a section (write) or get the variant data type and read the appropriate section (read) This would be straightforward using inheritance but how to access an object variant data in a generic way without inheritance? The information available in a GOOP refnum (as a variant) is the classname (enum item 0) and the name of the typedef control. Opening a reference to the typedef control, we can read its path (then locate the VIs of the class). One can locate the GetData method of the object but it can't be dynamically called (unknown conn pane) or run (it is usually reserved for call). Should each class have generic Get/Set Data as Variant VI with fixed connector pane? Any other idea? Please discuss Jean-Pierre |