Please read my answers below
El 04/05/12 08:35, anatoly techtonik escribió:
> On Fri, May 4, 2012 at 3:54 PM, Carlos Córdoba<
ccord...@gmail.com> wrote:
>> This is really great! I was trying to add it the other day but totally
>> failed. It was very needed cause it makes the widget so much easier to use.
>>
>> Unfortunately I can't help you with the signal/event review but from the
>> little I know they seem fine. I just have one question: why was not it
>> possible to add Enter as a keyboard shortcut to the widget here?
>>
>>
http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/findreplace.py?spec=svn9caff1b29c1499d11c90451442feec65be9e1795&r=9caff1b29c1499d11c90451442feec65be9e1795#143
>>
>> (I say add it, because F3 has to continue working as usual). I mean, ¿why
>> Enter has to be registered and processed as a keyboard event? I'm just
>> asking because it seems a bit more complicated than adding a shortcut.
> I understood that these shortcuts are global - even if the panel is
> inactive, they still work. I needed Enter shortcut processed only when
> widget is active. More than than - this shortcut is only active in
> ComboBox widget.
I tried it and you're totally right here. I understand know you solution
and think it's the right approach, thanks for the explanation.
> It was also possible to override keyPressEvent() in
> parent FindReplace() widget, but then Enter will work as find_next()
> when focus was on all other elements too.
>
> I thought writing a tutorial of resolving this particular bug into
> Spyder blog as an example of reverse engineering for new people, but
> quickly realized that I've run out of time. =)
If you finally find the time, it would be a great reading for the other
devs and future contributors :)
Cheers,
Carlos