Bo Peng wrote:
Bo> Fixed in the attached patch. Jose, OK to apply?

I am not very pleased with the use of an exception there, but on the
other hand I do not have (yet) a better idea.

I though of returning TocItem and let update() add the labels.
However, ParConstIterator does not have a default constructor like
ParConstIterator(0) so I can not test special cases in update().

Per the use of exception, I think exception should be used more often
in lyx. For example, counters are not updated immediately after, say,
an caption is added to InsetInclude. It would be good to have
something like

try
   work on inset going on
except updateCounter (+1, or -1)
except updateScreen (partial or all)
except kill me please

Just some random thought.

IMHO exceptions should only be used in _exceptional_ situation because they bypass the normal function to function communication. I think the way you want to use them is going to slow down the code significantly. This is reason why I don't like for example the way exceptions are misused in the listings code.

Abdel.

Reply via email to