typo/stack effect corrections
parent
fe0c2f6ca2
commit
9a551fdd43
|
@ -2,7 +2,7 @@ IN: compiler
|
|||
USING: assembler help words ;
|
||||
|
||||
HELP: compiled? ( word -- ? )
|
||||
{ $values { "word" "a word" } }
|
||||
{ $values { "word" "a word" } { "?" "a boolean" } }
|
||||
{ $description "Tests if a word is compiled." } ;
|
||||
|
||||
HELP: compile
|
||||
|
|
|
@ -37,19 +37,24 @@ HELP: try
|
|||
{ $description "Calls the quotation. If it throws an error, logs the error to the default stream and restores the data stack." } ;
|
||||
|
||||
HELP: expired-error.
|
||||
{ $values { "obj" "an error" } }
|
||||
{ $error-description "Thrown by " { $link alien-address } " and " { $link alien-invoke } " if an " { $link alien } " object passed in as a parameter has expired. Alien objects expire if they are saved an image which is subsequently loaded; this prevents a certain class of programming errors, usually attempts to use uninitialized objects, since holding a C address is meaningless between sessions." }
|
||||
{ $notes "You can check if an alien object has expired by calling " { $link expired? } "." } ;
|
||||
|
||||
HELP: io-error.
|
||||
{ $values { "error" "an object" } }
|
||||
{ $error-description "Thrown by the C streams I/O primitives if an I/O error occurs." } ;
|
||||
|
||||
HELP: undefined-word-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown if an attempt is made to call a word which was defined by " { $link POSTPONE: DEFER: } "." } ;
|
||||
|
||||
HELP: type-check-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown by various primitives if one of the inputs does not have the expected type. Generic words throw " { $link no-method } " and " { $link no-math-method } " errors in such cases instead." } ;
|
||||
|
||||
HELP: signal-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description
|
||||
"Thrown by the runtime when a Unix signal is received. While signal numbers are system-specific, the following are relatively standard:"
|
||||
{ $list
|
||||
|
@ -61,21 +66,27 @@ HELP: signal-error.
|
|||
} ;
|
||||
|
||||
HELP: negative-array-size-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown by " { $link <array> } ", " { $link <string> } ", " { $link <vector> } " and " { $link <sbuf> } " if a negative capacity is specified." } ;
|
||||
|
||||
HELP: c-string-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown by " { $link alien-invoke } " and various primitives if a string containing null bytes, or characters with values higher than 255 is passed in where a C string is expected. See " { $link "c-strings" } "." } ;
|
||||
|
||||
HELP: ffi-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown by " { $link dlopen } " and " { $link dlsym } " if a problem occurs while loading a native library or looking up a symbol. See " { $link "alien" } "." } ;
|
||||
|
||||
HELP: heap-scan-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown if " { $link next-object } " is called outside of a " { $link begin-scan } "/" { $link end-scan } " pair." } ;
|
||||
|
||||
HELP: undefined-symbol-error.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown if a previously-compiled " { $link alien-invoke } " call refers to a native library symbol which no longer exists." } ;
|
||||
|
||||
HELP: user-interrupt.
|
||||
{ $values { "obj" "an object" } }
|
||||
{ $error-description "Thrown by the " { $snippet "t" } " command in the FEP." } ;
|
||||
|
||||
HELP: datastack-underflow.
|
||||
|
|
|
@ -38,7 +38,7 @@ HELP: <wrapper> ( obj -- wrapper )
|
|||
{ $values { "obj" "an object" } { "wrapper" "a new wrapper" } }
|
||||
{ $description "Creates an object which pushes " { $snippet "obj" } " on the stack when evaluated. User code should call " { $link literalize } " instead, since it avoids wrapping self-evaluating objects (which is redundant)." } ;
|
||||
|
||||
HELP: literalize
|
||||
HELP: literalize ( obj -- wrapped )
|
||||
{ $values { "obj" "an object" } { "wrapped" "an object" } }
|
||||
{ $description "Outputs an object which evaluates to " { $snippet "obj" } " when placed in a quotation. If " { $snippet "obj" } " is not self-evaluating (for example, it is a word), then it will be wrapped." }
|
||||
{ $examples
|
||||
|
|
|
@ -14,7 +14,7 @@ words definitions ;
|
|||
: io-error. ( error -- )
|
||||
"I/O error: " write third print ;
|
||||
|
||||
: type-check-error. ( list -- )
|
||||
: type-check-error. ( obj -- )
|
||||
"Type check error" print
|
||||
"Object: " write dup fourth short.
|
||||
"Object type: " write dup fourth class .
|
||||
|
|
|
@ -29,7 +29,7 @@ HELP: rect-bounds
|
|||
{ $see-also rect-extent } ;
|
||||
|
||||
HELP: <extent-rect> ( loc ext -- rect )
|
||||
{ $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "newrect" "a new " { $link rect } } }
|
||||
{ $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "rect" "a new " { $link rect } } }
|
||||
{ $description "Creates a new rectangle with the specified top-left and bottom-right corner locations." } ;
|
||||
|
||||
HELP: rect-extent
|
||||
|
@ -58,7 +58,7 @@ HELP: gadget
|
|||
{ { $link gadget-orientation } " - one of " { $snippet "{ 0 1 }" } " or " { $snippet "{ 1 0 }" } ". This slot is used by layout gadgets such as " { $link pack } "." }
|
||||
{ { $link gadget-state } " - stores the layout state of the gadget. Do not read or write this slot directly, instead call " { $link relayout } " and " { $link relayout-1 } " if the gadget needs to be relayout." }
|
||||
{ { $link gadget-visible? } " - a boolean indicating if the gadget should display and receive user input." }
|
||||
{ { $link gadget-root? } " - if set to " { $link t } ", layout changes in this gadget will not propogate to the gadget's parent." }
|
||||
{ { $link gadget-root? } " - if set to " { $link t } ", layout changes in this gadget will not propagate to the gadget's parent." }
|
||||
{ { $link gadget-clipped? } " - a boolean indicating if clipping will be enabled when drawing this gadget's children." }
|
||||
{ { $link gadget-grafted? } " - if set to " { $link t } ", the gadget is parented in a native window. Do not write this slot directly, instead add gadgets to visible gadgets or use " { $link open-window } " to display gadgets in new windows on the screen." }
|
||||
{ { $link gadget-interior } " - an object whose class implements the " { $link draw-interior } " generic word." }
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2005, 2006 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: gadgets
|
||||
USING: generic hashtables inference kernel math namespaces
|
||||
sequences vectors words parser ;
|
||||
IN: gadgets
|
||||
|
||||
GENERIC: graft* ( gadget -- )
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ HELP: relayout
|
|||
|
||||
HELP: relayout-1
|
||||
{ $values { "gadget" gadget } }
|
||||
{ $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propogate requests up to the parent, and so this word should only be used when the gadget's internal layout or appearance has changed, but the dimensions have not." }
|
||||
{ $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propagate requests up to the parent, and so this word should only be used when the gadget's internal layout or appearance has changed, but the dimensions have not." }
|
||||
{ $see-also relayout } ;
|
||||
|
||||
HELP: set-layout-dim
|
||||
|
|
|
@ -57,7 +57,7 @@ HELP: gen-texture
|
|||
{ $description "Wrapper for " { $link glGenTextures } " to handle the common case of generating a single texture ID." } ;
|
||||
|
||||
HELP: save-attribs
|
||||
{ $values { "what" integer } { "quot" quotation } }
|
||||
{ $values { "bits" integer } { "quot" quotation } }
|
||||
{ $description "Wraps a quotation in " { $link glPushAttrib } "/" { $link glPopAttrib } " calls." } ;
|
||||
|
||||
HELP: sprite
|
||||
|
@ -80,7 +80,7 @@ HELP: gen-dlist
|
|||
{ $description "Wrapper for " { $link glGenLists } " to handle the common case of generating a single display list ID." } ;
|
||||
|
||||
HELP: make-dlist
|
||||
{ $values { "type" "one of " { $link GL_COMPILE } " or " { $link GL_COMPILE_AND_EXECUTE } } { "quot" quotation } }
|
||||
{ $values { "type" "one of " { $link GL_COMPILE } " or " { $link GL_COMPILE_AND_EXECUTE } } { "quot" quotation } { "id" "an OpenGL texture ID" } }
|
||||
{ $description "Compiles the results of calling the quotation into a new OpenGL display list." } ;
|
||||
|
||||
HELP: gl-translate
|
||||
|
|
|
@ -179,7 +179,7 @@ HELP: set-word
|
|||
{ $see-also word } ;
|
||||
|
||||
HELP: vocabs
|
||||
{ $values { "word" "a sequence of strings" } }
|
||||
{ $values { "seq" "a sequence of strings" } }
|
||||
{ $description "Outputs a sequence of all defined vocabulary names." } ;
|
||||
|
||||
HELP: vocab
|
||||
|
|
|
@ -134,7 +134,7 @@ HELP: spawn-link
|
|||
{ $values { "quot" "a predicate with stack effect " { $snippet "( -- )" } }
|
||||
{ "process" "a process object" }
|
||||
}
|
||||
{ $description "Start a process which runs the given quotation. If that quotation throws an error which is not caught then the error will get propogated to the process that spawned it. This can be used to set up 'supervisor' processes that restart child processes that crash due to uncaught errors.\n" }
|
||||
{ $description "Start a process which runs the given quotation. If that quotation throws an error which is not caught then the error will get propagated to the process that spawned it. This can be used to set up 'supervisor' processes that restart child processes that crash due to uncaught errors.\n" }
|
||||
{ $see-also spawn } ;
|
||||
|
||||
ARTICLE: { "concurrency" "loading" } "Loading"
|
||||
|
|
Loading…
Reference in New Issue