>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

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

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

You know, people do weird things with their documents, ad you should
not assume automatically that the only thing you are interested is
just the inset above.

>> Kind of a solution in search for a problem.

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

Are we really here arguing about a loop over at most 5 elements? Any
solution which is always right will fit the bill. Personally, I prefer
the cursor approach, and you have the right to prefer another
approach. But for the code in discussion, it is 100% equivalent. The
only difference is that the recursive parent code is not implemented,
but the code to scan a cursor is already here.

JMarc

Reply via email to