CAN's create-note handler should listen for COMMAND_ADD¶
CAN's create-note handler is intended to add a new note at the note's address using the current state of the scratchfile to determine which note is added.
When the COMMAND_ADD event is detected, the create-note handler should take the current scratchfile's AST and store it at the address calculated for that AST earlier within the CAN notebook.
Once the create-note handler has successfully done this it should fire a NOTE_CREATED event. If it fails, it should fire a NOTE-CREATED-ERROR event.
Backlinks¶
- CAN's add command should save the current scratchfile as a note.
- To get this done, a create-note handler should be created to listen for the COMMAND_ADD event, upon which it should store the note as described above.