Are we expecting embedders to talk directly to nsIControllers?
The reason I ask is that we're trying to nail down the emebedding
APIs that the editor will use. We'd like to avoid duplicating
functionality in different interfaces, and, in addition, protecting
the emebedder from the low-level editor APIs.
One way to do this would be to put a lot of functionality into
commands, which can be gotten at and executed using nsIControllers.
The embedder would have to then do something equivalent to
var controller =
top.document.commandDispatcher.getControllerForCommand(command);
if ( controller && controller.isCommandEnabled(command))
controller.doCommand(command);
to execute a command. Getting command state would be similar.
The alternative would be for editor to provide a 'spoon-feeding'
interface that gives the embedder an easy-to-use way of doing
common editor operations. The command implememtations could
then call this, or lower-level APIs.
A related question is what happens with commands that need to
throw up UI, like Save and Open? Are we expecting the emebedder
to implement the file picker APIs to get their own UI? And who
should have the task of throwing these dialogs -- the embedder,
or composer?
Simon
--
Simon Fraser Entomologist
[EMAIL PROTECTED] http://people.netscape.com/sfraser/