well, this is exactly the implementation I currently have and which I
don't like. And the reason I do not like is that if the command needs
more than one input (replace, for instance), than this method gets way
too cumbersome: you can do it but it's ugly.
Now you're going to make me crack open the Emacs code to see how *they* do it.
Moreover, take exactly this
example with the Goto, the editor.Goto function should take an int, but
the minibuffer gets a string from the TextCtrl. How does it know the
string must be converted to an int? Of course I can put this in the Goto
method, but it's jus a hack.
I'm not sure why that's a hack. I suppose that each use of your minibuffer
(search, search-replace, goto line, etc.) could provide some GUI info for
setting up the control, such as the number of arguments and the validators to
use for each one.
By the way, even when there's a separate dialog box, most of the apps I use on
a day-to-day basis don't make something like the search-replace dialog modal.
The minibuffer in
EMACS, on the other hand, is for everything.
You keep comparing this feature to the minibuffer in emacs, but I like the
emacs minibuffer *because* it's non-modal. Thus, I can start the search and
replace, realize that I have a long string to search, jump into the main
buffer, copy the text I want to search, jump back to the mini-buffer, paste
that text, etc. If I need to, I can start the search and replace, enter the
search string, jump out of the minibuffer, start a *new* mini-buffer so that
I can open a second file, find the string to replace in the second file, copy
it, jump back to the original minibuffer, and paste the string.
In fact, if your minibuffer is modal, then I'm not sure why you're going to
the trouble to avoid a modal dialog instead. I hit search-replace. The
cursor jumps into the minibuffer where I'm trapped until I type in the
strings or decide to cancel. Or, a new dialog box opens, my cursor jumps
into the text control of the dialog, and I'm trapped in the dialog until I
type in the strings or decide to cancel. It seems like pretty much identical
functionality for the end user, isn't it?
Just curious why you're going to all this trouble...
Now if your minibuffer is going to be as cool as the Emacs one, where I get
*all* of the editing features that are available in the main window,
non-modal behavior, multiple currently active minibuffers, etc. Well, *that*
would be worth the effort!
---Tom
···
On Wednesday 03 November 2004 04:55 am, Curzio Basso wrote: