Le 9 juil. 05 à 13:01, Stefan Urbanek a écrit :
On Thu, 2005-07-07 at 22:07 +0100, Nicolas Roard wrote:
Just putting together a few ideas discussed with david and jesse..
Remember theses recent articles, "{ jabber | the url field } is the
new command line" ?
Well, they contain a lot of truth :-D
Basically, I think that command line, while it shouldn't be
obligatory, should be
available easily to enter commands on the desktop -- simply because
it's really powerful :-)
Though, instead of opening an xterm, what we should do is to have a
textfield either
opened all the time or opened by a shortcut (like on tiger,
command-space open the spotlight search field) -- anyway the user can
open an xterm if he needs it.
But having an always-present or easily present textfield/command line
would be great.
Yes, that was one of intentions of StepTalk - to be able to have
shared
place for "talking to all objects available to the user". Back-end is
there, only GUI is missing.
It is strange to read this discussion, because when I was in the
train few days ago, I was trying to think what could/should be a
shell which doesn't suck unlike current Unix-like shell. My first
idea was to use StepTalk, both architecture and language, … well it
is a serious proposal, not a proposal just to make Stefan happy ;-)
Imagine that we have "backends" for this command-line, separate
programs that can do something with what you type. Example of
backends:
- a search backend :-)
- an help backend, searching in the help ..
- an "open url" backend (type an url, it opens it in the browser)
- an "open directory" backend (type a path, it opens the
filemanager..)
- an "assistant" backend (type "remember seb's birthday", it will add
an entry on your todo list, etc. See NewtonOS for more ideas...)
- a jabber backend (type "how are you ?", choose the person and send
it through jabber)
- etc.
Looks like a roles related idea.
Perhaps STEngine? :) Object names are in STContext/STEnvironment.
Changing languages in a conversation is easy: [conversation
setLanguage:aLanguage].
I would say it should be transparent and based on double dispatch-
like polymorphism, I mean when you write :
open object
it would be translated to :
[role open: object]
- open: (id)object
{
[[roleRegistry roleForObject: object] open: object]
}
In more well thought way, we would have :
role open object
where 'role' is optional
it would be translated to :
[object open]
- open
{
contextRole = [role roleForCurrentContext] // The optional
'role' value
if (contextRole == nil)
{
[[role roleForObject: self] open: self]
}
else
{
[contextRole open: self];
}
}
I think it's rather clear that having a command line would be
really handy.
Now, how to choose which backend will execute what you typed ?
Well, I don't think there's only one answer, but likely a mix of
theses:
- have a pull-down menu listing all the backends, you click on the
one you want
Get all language bundles?
I would say no, because roles (aka backends) and language bundles are
unrelated concepts.
With roles model, manual backends choice would become uneeded most of
time, it would just be used to override default role.
- use keyboard shortcuts (indicated on the menu)
- have intelligent, context-sensitive tab completion (and thus you
could derive the right action too, as well as providing help to the
user with the completion)
Like in stshell? :)
Exactly ;-)
StepTalk can be used for that for the very beginning as it already
contains appropriate tools:
- context container with dictionary of named obects
- conversation mechanism
- language bundles
Later language autodetection can be used. Unimplemented StepTalk
API is
there (see STEngine.h).
I couldn't explain it better :-)
Quentin.
--
Quentin Mathé
[EMAIL PROTECTED]