Add docs for no-edit-hook, link "definitions" article in, don't draw-world if the world has 0 width or height
parent
06f6c206c8
commit
e226b9f7c7
|
@ -10,6 +10,7 @@ $terpri
|
|||
"Interactive development:"
|
||||
{ $subsection "listener" }
|
||||
{ $subsection "debugger" }
|
||||
{ $subsection "definitions" }
|
||||
{ $subsection "word-introspection" }
|
||||
{ $subsection "inspector" }
|
||||
{ $subsection "annotations" }
|
||||
|
|
|
@ -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." } ;
|
||||
|
|
|
@ -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" ;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue