* Not 100% sure about this one, looks like proposed change not sure if it was taken o abandoned; no referenced * YREM.CM was used with old loadup process; P4A.scn isn't referenced, looks like junk
2 lines
4.4 KiB
Plaintext
2 lines
4.4 KiB
Plaintext
|
||
The following notes explain my (woz) idea of what the edit-interface should be responsible for, and what constitutes and "editor".
|
||
|
||
An editor is a symbol who's function takes the args (structure props options) and starts an interactive editor on the structure. PROPS is a property list, and OPTIONS is a list of keywords, both affecting the behavior of the editor. The property :completion-fn specifies the function to be called when the user completes the edit. The completion-fn will be called with the arguments (structure props options changed?), where structure is the edited structure (even on abort, so that the edit interface could implement "undo abort"), props and options are as specified on the call to the editor and will be used to figure out what to do with this completion, and changed? is NIL (no changes made), T (changes made), or :ABORT (user wants to abort changes). It is then up to the completion function to do the right thing with the result of the edit.
|
||
|
||
The goal is that the editor doesn't know anything about who started it, where the structure came from, or what to do with it when it's done. And the edit-interface doesn't know anything about the editor's data structures.
|
||
|
||
In the case of open edit sessions (open or shrunk):
|
||
If the editor is told to start an edit, the editor must look for one already existing that matches (this can't be the responsibility of the edit interface, because it doesn't know about existence of open edits). the editor should restart the existing edit, processing any new props or options appropriately.
|
||
|
||
The markaschanged issue:
|
||
Since the editor knows it may have open edits, it needs to provide a hook for when the world gets changed underneath the editor. in this world this means markaschanged. in this case the editor should try to restart itself with the new structure. in other words, sedit::markaschangedfn should call edit-definition to start a new edit. the editor will then notice it has a matching edit open and restart itself with the new info.
|
||
ÿÿ |