sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TODO list


From: Bernhard Herzog
Subject: Re: TODO list
Date: Mon, 15 Nov 2004 22:00:10 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

"C. Ecker" <address@hidden> writes:

> I ticked this with "(me)" because I already finished what I found in CVS
> but certainly not very elegant. So please do it.

I've just committed the main part of the duplicate command.  There's not
much missing, really, except that it could be implemented more
efficiently (worst case is current O(n**2) in the number of selected
objects).  

I have removed the duplication offset feature for now.  The
DuplicateObjects method of compound objects now simply takes a list of
objects all of which must be children of the compound.  I'm not sure
whether we should add the duplication offset again later, but if we do
we should do it either in the EditorWithSelection class or perhaps in
the command.

> I found that there is a problem with commands.  Currently they are only
> able to listen to signals from the context. So the selection should either
> be moved to the context, or the commands implementation should be changed.

Having the selection in the context doesn't make sense IMO.  It belongs
into the editor where it is now.  The context forwards messsages from
the current editor and document, so in most cases you do want the
messages from the context because commands should always apply to the
current document.  This may be more difficult when we have toolbars and
menus on each document window in which case the messages will have to
come from the editor or document associated with the window the menu or
toolbar belongs to.  But that can be solved without modifying he
commands since the actual subscription currently happens in the menu
implementation not in the commands.

> Similar problems might occur with commands which are specific to e.g. a
> certain panel, so probably commands hould be more flexible.

If this is for menus then a panel could have its own context object and
pass that to the menus it creates so that the menu items would subscribe
to the messages from that panel specific context.  If the command only
use the context to e.g. determine the document and editor to work with,
this should work quite well.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]