]> gitweb.factorcode.org Git - factor.git/commitdiff
Add docs for no-edit-hook, link "definitions" article in, don't draw-world if the...
authorslava <slava@factorcode.org>
Mon, 25 Sep 2006 02:30:35 +0000 (02:30 +0000)
committerslava <slava@factorcode.org>
Mon, 25 Sep 2006 02:30:35 +0000 (02:30 +0000)
doc/handbook/tools.facts
library/tools/definitions.facts
library/tools/errors.factor
library/ui/ui.factor

index df072a3d32424c9908290a7681192425fa698595..8e9116816c3a97ea3a16987b618557592fa31469 100644 (file)
@@ -10,6 +10,7 @@ $terpri
 "Interactive development:"
 { $subsection "listener" }
 { $subsection "debugger" }
+{ $subsection "definitions" }
 { $subsection "word-introspection" }
 { $subsection "inspector" }
 { $subsection "annotations" }
index 1ac05a522ce3fc32cd18f071744729fd52188202..737e64d2c33abeaa3e6569552bbd8f65d0f49955 100644 (file)
@@ -1,5 +1,5 @@
 IN: definitions
-USING: help io prettyprint ;
+USING: help io modules prettyprint ;
 
 HELP: ?resource-path
 { $values { "path" "a string" } { "newpath" "a string" } }
@@ -33,3 +33,17 @@ HELP: comment.
 { $values { "string" "a string" } }
 { $description "Prettyprints some text with the comment style." }
 $prettyprinting-note ;
+
+HELP: edit
+{ $values { "defspec" "a definition specifier" } }
+{ $description "Opens the source file containing the definition in the default editor. You must load one of the following modules using " { $link require } " for this word to work:"
+    { $list
+        { $snippet "contrib/emacs" }
+        { $snippet "contrib/jedit" }
+        { $snippet "contrib/textmate" }
+        { $snippet "contrib/vim" }
+    }
+} ;
+
+HELP: no-edit-hook
+{ $error-description "Thrown when " { $link edit } " is called when the " { $link edit-hook } " variable is not set. See " { $link edit } " for details." } ;
index 5986f9542649552d542f9036001085c1fe7eb9dd..7ea959cc372c8434071c5c64639c78604e2651c9 100644 (file)
@@ -3,7 +3,7 @@
 IN: errors
 USING: generic help tools io kernel math math-internals parser
 prettyprint queues sequences sequences-internals strings test
-words ;
+words definitions ;
 
 : expired-error. ( obj -- )
     "Object did not survive image save/load: " write third . ;
@@ -157,3 +157,5 @@ M: condition error. delegate error. ;
 M: condition error-help drop f ;
 
 M: assert summary drop "Assertion failed" ;
+
+M: no-edit-hook summary drop "No edit hook is set" ;
index 59ac998553c29a2a518860feb7efdd7567c232f0..a01c435324d08e1b0945e348e065335bc3b95825 100644 (file)
@@ -172,8 +172,13 @@ M: world-error error.
     "This world has been deactivated to prevent cascading errors." print
     delegate error. ;
 
+: draw-world? ( world -- )
+    #! We don't draw deactivated worlds, or those with 0 size.
+    #! On Windows, the latter case results in GL errors.
+    dup world-active? swap rect-dim [ zero? not ] all? and ;
+
 : draw-world ( world -- )
-    dup world-active? [
+    dup draw-world? [
         [
             dup world set [
                 dup (draw-world)