(dns-mud-moo-org-simpleedit 1.0)

This MCP 2.1 package is designed as a simple replacement for the local editing facilities found in LambdaCore and in MCP 1.0. Like those facilities, it simply provides a way for a server to send a client some text for the user to edit, and for the client to send back the edited text. In contrast, however, the send-back facility uses MCP itself, rather than simply sending back in-band commands.

There are only two messages in the simpleedit package: content, sent by the server to the client to provide text to be edited, and set, sent by the client to the server when the text has been edited.

dns-org-mud-moo-simpleedit-content(reference, name, content*, type)

This message is sent by the server to the client to provide some text for the user to edit.

Reference is a machine-readable string that will be used in the set message to identify the text sent back to the server when the user is done editing. Name is a human-readable string to show the user what text is being edited. Content is a multi-line value containing the actual text to be edited.

Type identifies the type of the information, using one of three identifiers: string, string-list, or moo-code. A string is a single-line value; a string-list is multiple lines of text with no specified structure; and moo-code is program code in the MOO language. Clients that provide no special support for MOO programming can treat moo-code as equivalent to string-list.


    #$#dns-org-mud-moo-simpleedit-content 3487 reference: #73.name
       name: "Joe's name" type: string content*: "" _data-tag: 12345
    #$#* 12345 content: Joe

This allows the user to edit Joe's name, currently set to "Joe". The value "Joe's name" will be presented to the user, perhaps as the title bar of a window. Note that although "Joe" is a string and thus only a single line, it is still sent as a multiline value.

dns-org-mud-moo-simpleedit-set(reference, content*, type)

This message is sent from the client to the server when the user requests it (e.g., with a "Send" or "Save" button or command). Reference, content, and type are as above; in particular, the reference should be the reference provided by the earlier content message.


    #$#dns-org-mud-moo-simpleedit-set 3487 reference: #73.name
       type: string content*: "" _data-tag: 54321
    #$#* 54321 content: Erik

In this example, someone has changed Joe's name to Erik.