Hi Anatoly,
I've seen you also work on Linux so I think you'll find my few advices
useful:
1. First, use *ack* to find the file you need to work on. *ack* is a
perl script that behaves pretty much like grep, but doesn't search
inside binaries, build dirs, nor .hg or .git ones. It's been explicitly
designed to easily search source code trees and it has colored output.
In Ubuntu you can install it with:
$ sudo apt-get install ack-grep
In your case, I'd run a search for Ctrl-F with it, because that's how
the widget is called. Something like
$ ack-grep 'Ctrl\+F'
inside the spyderlib dir gives one promising result (apart from others):
widgets/findreplace.py
142: self.togglefind_sc = QShortcut(QKeySequence("Ctrl+F"), parent,
167: (self.togglefind_sc, "Find text", "Ctrl+F"),
So now you know that widgets/findreplace.py is your starting point.
2. Now my advice become less explicit and more general. Obviously, your
next step is open the file and start to look at their classes. Maybe you
realize all you need to do is to modify code inside it. But it could be
the case that a class in it inherits a class from other file, which is
the one you think you have to modify. So you run ack again to find where
this new code is located, and so on until you find the right spot.
3. Always maintain the Internal Console open to read the errors you get
while you hack on Spyder. I found it an invaluable tool to understand
what I am doing wrong. You can also add print statements to any file and
the results will be printed in the Internal console too (or simply in
the terminal from which you launched Spyder). That's quite cool! For
example, it let me solve Issue 647.
4. Browse the Qt docs with passion to find how to use their classes and
libraries. At least I have to do that a lot since I know pretty much
nothing about Qt.
That's all I have to say. Maybe we could setup an IRC channel or use
gmail chat to work on bugs/enhancements together. I'm sure our
productivity will improve a lot.
Pierre, what do you think?
Cheers,
Carlos
El 22/09/11 04:47, anatoly techtonik escribió:
I won't expand on how cool it is if people with no knowledge of Spyder
codebase could send a patch in just a few hours. And to make this
happen they need two things:
1. An entrypoint
2. Some guidance
Even if I know spyderlib a bit, right now I am in position of such a
person - with no entrypoint and guidance at all. So, this is a
question to all developers - how can one find the source of a problem
when Spyder misbehaves? I'd like to limit the scope to this specific
case - Spyder fails to focus on search panel that is called by
pressing Ctrl-F in editor if this panel is already present.
--
You received this message because you are subscribed to the Google
Groups "spyder" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/spyderlib/-/iAJonFU2mNcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/spyderlib?hl=en.
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/spyderlib?hl=en.