]> gitweb.factorcode.org Git - factor.git/commitdiff
Adding help for <model-field> and <action-field>.
authorMark Green <mark@antelope.nildram.co.uk>
Sat, 21 Feb 2015 20:45:01 +0000 (20:45 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 22 Feb 2015 02:39:04 +0000 (18:39 -0800)
basis/ui/gadgets/editors/editors-docs.factor

index 47136fb6b5c925424f6975eb26d1adb09af9a5ee..3ebd1cc83149d579ba6c68f7a6d8d9461641380f 100644 (file)
@@ -1,5 +1,5 @@
 USING: documents help.markup help.syntax ui.gadgets
-ui.gadgets.scrollers models strings ui.commands
+ui.gadgets.scrollers models strings ui.commands sequences
 ui.text colors fonts help.tips ;
 IN: ui.gadgets.editors
 
@@ -57,10 +57,21 @@ HELP: remove-selection
 { $values { "editor" editor } }
 { $description "Removes currently selected text from the editor's " { $link document } "." } ;
 
+HELP: <model-field>
+{ $values { "model" model } { "gadget" editor } }
+{ $description "Creates an editor gadget which targets the specified model. The model must contain a string, or another item with a defined " { $link length } ", as this will be checked during layout." } ;
+
+HELP: <action-field>
+{ $values { "quot" "a quotation ( string -- )" } { "gadget" editor } }
+{ $description "Creates an editor gadget with a blank model. Whenever a value is entered into the editor and Return pressed, the value is pushed on the stack as a string and the specified quotation is called. Note that the quotation cannot update the value in the field. " } ;
+
+
 HELP: editor-string
 { $values { "editor" editor } { "string" string } }
 { $description "Outputs the contents of the editor's " { $link document } " as a string. Lines are separated by " { $snippet "\\n" } "." } ;
 
+
+
 HELP: set-editor-string
 { $values { "string" string } { "editor" editor } }
 { $description "Sets the contents of the editor's " { $link document } " to a string,  which may use either " { $snippet "\\n" } ", " { $snippet "\\r\\n" } " or " { $snippet "\\r" } " line separators." } ;