Richard Heck wrote:

Now, so far as I can see, the un-handled variable here is the current Buffer. The Buffer will determine the CiteEngine; and if we have user-defined InsetCommand's, those too will be fixed by the Buffer (i.e., by the text class and modules). So what we really need is to be able to determine the current buffer inside InsetFoo:findInfo. Since this is static, I take it we aren't likely to do that, so perhaps what is needed is the option of passing the Buffer as argument to findInfo. But this is also problematic, as findInfo is called from InsetCommandParams, and so far as I can see there is no way to determine the current Buffer from inside InsetCommandPararms. We can get at that when InsetCommandParams is constructed, perhaps, so maybe that is the solution: Either to pass it or to determine it at construction-time, somehow. But maybe there are other possibilities I'm not considering.

Reading the code in "InsetCommandParams.cpp" I don't see why you need to fix info_ from within the ctor (and thus call findInfo from there). Maybe you could just pass the Buffer to the following methods:
setCmdName() and read().

Abdel.

Reply via email to