[Pgu-devel] FileDialog questions / enhancements.
Status: Beta
Brought to you by:
philhassey
From: Russell S. <se...@cs...> - 2006-01-18 03:50:56
|
I noticed some usability problems with FileDialog in pgu-0.9. Do you want patches for any of these? (1) The user must click on the file name input field before typing a file name. To work around this, I open the dialog like this: d = FileDialog(...) ... d.input_file.container.focus(d.input_file) d.open() (2) There is no way to ask the file dialog to refresh itself. I create the dialog once, and then call open() and close() on it so that it remembers its state from invocation to invocation. If you save to a new file, it won't show up the next time you open a file dialog! To work around this, I do this before I call open(): d.list.clear() d._list_dir_() (This might belong in its own method, otherwise, it should probably be added to open()) (3) Pressing enter doesn't dismiss the file dialog To work around this, I call: d._button_okay_clicked_(None) from my game's event loop. Should FileDialog listen for the keyboard event? (4) escape doesn't work Same as (3), except you need to call d.close() There are a few more annoyances that I don't have work arounds for: - <tab> doesn't behave as expected (it cycles to 'ok' before cycling to the file list, and then cycles through the visible list elements, and then breaks) - <shift-tab> behaves like tab - the arrow keys don't work in the file list I don't understand enough about dialog's handling of <tab> to fix these. Any ideas? Thanks, Rusty |