"Interactive development:"
{ $subsection "listener" }
{ $subsection "debugger" }
+{ $subsection "definitions" }
{ $subsection "word-introspection" }
{ $subsection "inspector" }
{ $subsection "annotations" }
IN: definitions
-USING: help io prettyprint ;
+USING: help io modules prettyprint ;
HELP: ?resource-path
{ $values { "path" "a string" } { "newpath" "a string" } }
{ $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." } ;
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 . ;
M: condition error-help drop f ;
M: assert summary drop "Assertion failed" ;
+
+M: no-edit-hook summary drop "No edit hook is set" ;
"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)