On Sat, 27 Sep 2008, Frank Niessink wrote: > Hi Jérôme, > > 2008/9/27 Jerome Laheurte <[EMAIL PROTECTED]>: >> >> I just noticed that toolbars use NewDomainObject whereas menus use >> <domain object>New. I think the reason for the separation dates back >> to before your offline work during your last holidays; we can probably >> get rid of the <domain object>New commands altogether (and Edit, and >> SubNew probably). What do you think ? > > I think you are right. We needed two different ways when there was > only one toolbar. Now that we have one toolbar per viewer each toolbar > should be able to know what type of domain object to create, which > won't change during the lifetime of the toolbar. So yes, I guess the > toolbars should be able to use <domain object>New commands.
And <domain object>New commands can be reduced to classes with 2 methods (getMenuText and getHelpText) if they inherit from NewDomainObject; actually they don't and each object may be created through 2 different ways, which will probably lead to subtle bugs. I've been looking into this; it's not as simple as I previously thought but definitely possible. One catch: if you're planning on making a new release in the 0.70 branch, I'll wait until then, because after these changes, the merge will probably turn to a nightmare :) Cheers Jérôme
