> bool InsetFormulaBase::searchForward(BufferView *, string const & what,
> bool const & = true, bool const & = false)
> {
> cerr << "searching '" << what << "' in " << par().nucleus() << endl;
> // we have to unlock ourself in this function by default!
> //bv->unlockInset(const_cast<InsetFormulaBase *>(this));
> return true;
> }
>
> is never called when doing some 'find' using the menu. Do I need some more
> activation magic?
Well yes you need this in formulabase.h
///
// it has to contain text to be searchable!
///
bool isTextInset() const { return true; }
> And what is this bv->unlockInset(const_cast<InsetFormulaBase *>(this)) good
> for?
IMO the logic should all be changed in 1.3.0, let's say this was a 1.0
implementations and after seeing that we CAN have s&r inside insets we
should now try to make it better.
Logic now:
The normal text has to lock the inset (by calling edit()) before the
searchForward() is being called. Then if we find something we return
true (and if appropriate set the selection), if we don't find something
we have to unlock ourself (the inset) and return false!
Logic to be (IMO):
The normal text comes to an inset and searchForward() of the inset is called.
Now the inset is resposible to lock itself and do all necessary update steps
if it finds something inside otherwise it just returns false and we're done
with it.
Now to anticipate your upcoming questions:
Q: Why has this not be done before?
A: The (un)lock calls of the inset have been made more inteligen recently by
me, NOW it is possible to call a lock inset from within a subinset without
the need of having the outer inset already locked, this was not possible
before.
Q: Why then not change now to the new method?
A: We have still a lot of bugs to fix and IMO we should concentrate on that
right now.
Jug
--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. J�rgen Vigna E-Mail: [EMAIL PROTECTED]
Italienallee 13/N Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
You can do more with a kind word and a gun than with just a kind word.
- Al Capone