Angus Leeming wrote: > Well, you receive a string, so print it out: > lyxerr << str << endl; > Now convert it to a param: > float_param param; > string2param(str, param); > Now convert it back and print: > string str2 = param2string(param); > lyxerr << str2 << endl; > > Are these two print statements the same?
Yes. I added some more debug statements. In InsetFloatParams::read, I added those: if (lex.isOK()) { lex.next(); string token = lex.getString(); lyxerr << "Should be placement: " << token << '\n' << endl; //<-- here if (token == "placement") { lex.next(); placement = lex.getString(); } else { // take countermeasures lex.pushToken(token); } lex.next(); token = lex.getString(); lyxerr << "Should be wide: " << token << '\n' << endl; // <-- and here if (token == "wide") { lex.next(); string const tmptoken = lex.getString(); wide = (tmptoken == "true"); } else { lyxerr << "InsetFloat::Read:: Missing wide!" << endl; // take countermeasures lex.pushToken(token); } } The output is: Should be placement: table Should be wide: table InsetFloat::Read:: Missing wide! but only when I right-click the inset (open the dialog). Lyx seems to have no problems with reading the inset when I open a file. Ideas? Jürgen.