On Thu, Dec 11, 2003 at 05:57:57PM +0000, Angus Leeming wrote: > 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?
Not much. So look for another playground. I just happened to notice that M-x accent-hungarian-umluat o does not work in 1.4.0cvs ;-) Andre'