Am 2006-01-24 um 16:05 schrieb Adi J. Sieker:
What about evt.keyCode? That should be equal to 13.
I tried that, but it didn't exist! (Exception...)
Really? I haven't looked at the freeNotes source, but all
KeyEvents should store that.
I currently use rawKeyCode. I had a look in the debugger and
evt.keyCode is available on Windows. Looking at dabo.ui.getEventData
there is no reason for it not to be available on MacOS X.
Sorry, I typed KeyCode... Shame on me!
Yes, it works. That makes:
def searchBoxKeyUp(self, evt):
#dabo.infoLog.write("KeyUp user typed rawKeyCode:%s" %
(evt.rawKeyCode))
#dabo.infoLog.write("KeyUp user typed keyCode:%s" %
(evt.keyCode))
#dabo.infoLog.write("KeyUp user typed keyChar:%s" %
(evt.keyChar))
if evt.keyCode in (dabo.ui.dKeys.key_Return,
dabo.ui.dKeys.key_Numpad_enter):
self.raiseEvent(freeNoteSearchEvent, searchTerm =
self.searchBox.Value)
evt.Continue = False
But even then, the search doesn't work. I guess it should switch
to the right page and highlight the found word?
No it doesn't search in the currently displayed note, but searches
all notes in the database and only displays those notes which
contain the text.
Ok, it seems to switch to that page, but highlights nothing, and
additionally it clears the notes tree and list!
The tree/list control should empty if nothing is found (note to
self, inform the user if nothing was found) or at least reduce the
notes displayed.
After some searches, sometimes somtehing or everything appears again.
something appears if the search term was found in some of the notes.
Ok, then this works like intended. But I find the behaviour a bit
confusing:
You must *know* that you must clear the search field to get the whole
list back.
But while a search is active, one cannot change the selection in the
list view (tree view works).
Hmm, this is on line 716 in the editor, does Python report the
wrong line numbers or are you by any chance still using and older
version?
It's because I changed your code to find the bugs ;-)
But I couldn't reproduce the error anyway.
But I still get this if I open a sub-note tree:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Dabo-0.5-py2.4.egg/dabo/lib/eventMixin.py",
line 87, in raiseEvent
bindingFunction(event)
File "freeNotes.py", line 737, in OnNoteSelected
biz.seek(evt.noteID,DB_FIELD_ID)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Dabo-0.5-py2.4.egg/dabo/biz/dBizobj.py", line
775, in seek
ret = self._CurrentCursor.seek(val, fld, caseSensitive, near)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/Dabo-0.5-py2.4.egg/dabo/db/dCursorMixin.py",
line 1120, in seek
val = int(val)
TypeError: int() argument must be a string or a number
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
http://www.cacert.org (I'm an assurer)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users