% % CodeMirror programming language editor % //------------------ |Cm _Ent.ExitData logs % % evaluate commands from the special editors % Ent._E3 ">Cm " log() < //------------------ |Startup % % special editor independent browser has started % record the window descriptions derived from document title info (E4) % also supplied at startup is the name of the Flash receptor (E5) for the browser % % startup for codemirror editor % % establish Cmeditor (not reserved comm), as the Util comm tx % (defaults to Util) % % save the document title for the browser % *coneidnt !Cm.Title 0 !Cm.Win _Cm.Title "IEFrame" *indymons { !Cm.Win % % save the receptor's identity % Ent._E5 *receptor dup !Cm.Ident second !Cm.Page % % initiate a transmitter socket for talking to special editor % *starcomm % % send the editable javascript text to the special editor % "Value" _Editor.Text escape send } if //------------------ |Reply % % handle the message/reply from the special editor % responding to our requests or a special editor initiated message % % distribute the message/reply to the requestee/requestor % Ent._E5 unescape "|" Str.Left "doing> " log() < |Accept % % accept edits message % "Current" empty send |Reject % % reject edits message, shut down the page in response % "Shut" empty send % % do not save the value content % |Current % % special editor's current text was requested % *conefcur |Shut % % page is going away, end our transmitter to it % "NoUtil" "StartComm" dance) > pop > pop