[GRASS-dev] console example 3
Michael Barton
michael.barton at asu.edu
Mon Dec 7 13:47:35 EST 2009
Yea, I know. ANOTHER diff and you haven't even gotten around to trying
the first one.
Anyway, try this in GRASS 6.5 (develbranch_6).
File insertion autocompletion works when you type "=" or "," (for
multiple maps) in the right context. For commands that take maps
without argument (e.g., r.info elevaition.dem), you can type ctrl-
space. So now it is is really an autocomplete feature.
Added better error trapping to all, including command history.
Cursor stays in window after running a command.
A few other cleanups to make it work more smoothly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: console_example3.diff
Type: application/octet-stream
Size: 12472 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20091207/4f5dec4a/console_example3.obj
-------------- next part --------------
When I first designed the CLI, I separated the entry and output areas
because the programming was easier and cleaner, especially with basic
StaticTextCtrl widgets that I started with. I only recently started
looking at the StyledTextCtrl that Martin replaced the original output
window with. This is a much more versatile text widget and provides
some very real advantages now to using it for both an input and output
window, primarily the autocompletion feature. This takes much less
coding in a StyledTextCtrl than in other text widgets, and seems
pretty robust functionally. The ability to put the cursor on any
command string and press return to run it is also handy when input and
output are combined.
If we substituted a STC for the input window as well as the output
window, we would have access to all the autocompletion features, of
course. But I'm not sure about the advantage of separating them now
beyond making it easier to see which command is being run at any given
time.
Anyway, if anyone of you (or others) who like to use commands would
try this, I'd appreciate feedback. Martin has given a prior version a
whirl.
Michael
More information about the grass-dev
mailing list