Comment 4 for bug 515914

Revision history for this message
RaiMan (raimund-hocke) wrote :

query = capture()
note = d[query][0]
popup(note)

even if you only run this once, its not "good" code, because d[query] could result None (nothing found) and then [0] evaluates to an key-error (None cannot be indexed).

So at least it has to look like this:

query = capture()
note = d[query]
if note:
    popup(note[0])
else:
   popup["not found"]

On my Mac OS X 10.6 I got it running with no problems at all. May be you have to update your Java (was the problem with other bug reports and questions).

The app as such is tricky, since the user has to know what to capture ;-)