Hi Robert, >> Nice idea. When you have this, then you can even add a context menu >> "close context" to the item, for exactly the case where the macro failed >> to close it. This way, we could prevent breaking the complete Undo >> mechanism in a document - at least the user is able to repair it, then. > > I'm not sure if this is the right option. Try to think as a common > user - visual indicator of Undo stack, Close context menu item in a > context menu => confused user. From this point of view, there should > be Undo & Redo buttons only and if there is a problem, these buttons > should be disabled.
You're right, this would be an advanced feature ... and thus should perhaps not be offered. Disabling the menu items is a good idea, but then this is what I called "broken": effectively, Undo and Redo are not available anymore, then. > IMO Undo stack should be limited to the OpenOffice.org documents only > with two functions in the API (something like startUndoBlock(), > endUndoBlock()) for them. I agree that we should limit to what is really necessary, but there's more - see my first mail in this thread for what I consider essential. > So, extension can say, that more than > actions should be grouped into one Undo action. No more, no less. If > you want to implement something like removing a post from blog with > Undo action, developer should implement it as an action available from > a toolbar / menu. There's more than this. In fact, there are actions on a document which are *not* covered by the "native" Undo operations. Especially via API, you can do things which will never appear in the Undo stack. I can talk about my domain here only (I could name you a few scenarios with form controls), but I suppose there are others, too. > The problem can raise when startUndoBlock() was called and > endUndoBlock() wasn't called. There can be grayed item in the Edit > menu (Undo action name). When user clicks on this item, dialog can > appear with information like this - extension ABC is still working > with your document, undo can't be performed, do you want to stop / > disable extension ABC? If user hits stop / disable button, extension > will be disabled, Undo block will be closed and Undo action will be > performed. Otherwise (if user hits Cancel button), nothing happens. Interesting idea. While it is not possible (architecture-wise) to execute an action on a grayed menu item, the item could be available, but show some text "not possible: running action", or something like that, and then behave as described by you. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
