Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Jürgen Spitzmüller wrote:
Abdelrazak Younes wrote:
I understand but I still don't like the scanning... :-)
 I don't like it either. But I don't see an alternative yet.

Abdelrazak> We could just provide the feature if the label is not
Abdelrazak> deeper than one-level. If the user wants to deeply bury
Abdelrazak> the label inside nested insets, then he will miss the
Abdelrazak> feature. In other word:

I really do not understand your point. We have a cursor.

The cursor carries way too much information. This was most certainly a clear improvement over the old code but at this point it is difficult to do real cleanup. Look at the flurry of LyXText functions. A lot of them (most of them) do touch much more than the contents of the _current_ LyXText, this is no good.

We have a
method giving the right information.


I do not see why you want to find
a suboptimal method which only interest is to fit some theory of
yours.

My theory is simple: use what we have access to. Scanning all the enclosing inset in search for an information that you could have at first hand _is_ suboptimal in terms of CPU cycle.

Kind of a solution in search for a problem.

No, if you really want to scan through all the enclosing insets it is still possible with a recursive call to parent(). It will be less code than the inset scanning and more efficient too.

Abdel.

Reply via email to