Changes between Initial Version and Version 2 of Ticket #2817


Ignore:
Timestamp:
Feb 10, 2009, 4:14:37 AM (12 years ago)
Author:
Garry Yao
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2817 – Description

    initial v2  
    44 * "FCKUndo.SaveUndoStep" back in v2 which support the undo/redo system is also invoked arround this number in the same case.
    55
    6 I wonder if we can hook these aspects of commands with  some new types of events , the ones I can imagine were:
    7  * ''initCommand'' which fired right after user click/hit the command, was used to allocate necessary resources for the command, this could be used to hook things like save the selection.
    8  * ''beforeCommandExe'' which indicate the command is about to make changes to the document, would be fired at different time for synchronized(e.g. styles) and asynchronized(e.g. dialogs), highly valuable for things like save undo stacks.
    9  * "afterCommandExe" on contrast indicate the command has made actually changes to the documents, used for restore selections and save redo stacks.
    10  * ''abortCommandExe" would be a branch case if the command has been canceled and thus has no major effect, which just bring user back to the document.
     6I wonder if we can hook these aspects of commands with  some new types of events , which make many hacks/fixes transparent to the commands logic itself, so in this sense, it also benefits for user extension.
     7
     8The ones which I propose for discussing:
     9 * '''initCommand''' which fired right after user click/hit the command, was used to allocate necessary resources for the command, e.g. save the initial selection ranges and undo snapshot.[[BR]]
     10 * '''beforeCommandExe''' which indicate the command is about to make changes to the content, OR modify the selection ranges(In some dialogs' loadElements case).  It would be fired at different time for synchronized(e.g. styles) commands and asynchronous(e.g. dialogs) ones (before ''onShow''?), it's useful for dialog commands which sometimes requires to enlarge the selection to the whole control OR restoring fake elements.[[BR]]
     11 * '''afterCommandExe''' indicate the command has made actually changes to the documents, which is useful for restore selections and  save redo stacks after then;
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy