Forum Navigation
Object serialize
Posted: 04/22/08 21:24:38I have an object that contains arrays of objects and I need to save and load these objects from file.
I've been trying to serialize these objects to file but I'm getting errors..
Table.d(185): function tango.io.protocol.model.IReader.IReader.get (bool) does not match parameter types (item[]) Table.d(185): Error: cannot implicitly convert expression (this.order) of type item[] to void delegate(IReader) Table.d(185): function tango.io.protocol.model.IReader.IReader.get (bool) does not match parameter types (item[][]) Table.d(185): Error: cannot implicitly convert expression (this.data) of type item[][] to void delegate(IReader) Table.d(191): function tango.io.protocol.model.IWriter.IWriter.put (bool) does not match parameter types (item[]) Table.d(191): Error: expected 0 arguments, not 1 Table.d(191): function tango.io.protocol.model.IWriter.IWriter.put (bool) does not match parameter types (item[][])
class item { //column name, attribute... char[] name; //vlaue as int, length as string int ival; //string values char[] sval; //is this an int? bool isint; //..class funcs not important void read(Reader input) { input (name) (ival) (sval) (isint); } void write(Writer output) { output (name) (ival) (sval) (isint); } } /** * TokenNode * Returned for next command * contains token string and Type */ class Table { private char[] name; //table name // table data, holds the rows.. item[][] data; // row prototype, in order.. item[] order; //...class funcs not important void read(Reader input) { input (name) (order) (data); //185 } void write(Writer output) { output (name) (order) (data); // 191 } }Any suggestions, commits... I'm not even using these functions yet... just trying to compile them in the classes
-Byron