Andre Poenitz wrote: In fact, InsetBibitem could have a constructor from a string and user code would look like
if (name == "bibitem") { return new InsetBibitem(cmd.argument); I'd rather that we used a free function returning 0 if the data was bogus. InsetOld * InsetCommandMailer::string2inset(string const & data); ;-) > This is also a bit verbose. We basically transform a 'data' into > 'data'. So why not have a freestanding > > void transformInsetBoxData(string &) > > or > string transformInsetBoxData(string const &) > > function doing the job of > > InsetBoxParams p(data); > data = InsetBoxMailer::params2string(p); But the frontends use exactly this code (they fill params first of course), so you are simply moving 2 lines of code used once into a free function. Dosen't seem much of an advantage, does it? -- Angus