ui: document non-polymorphic effect of with-ui, and that it doesn't return

db4
Joe Groff 2010-06-08 13:54:10 -07:00
parent 3602627ff2
commit c8bb9b3381
2 changed files with 5 additions and 5 deletions

View File

@ -73,10 +73,10 @@ HELP: raise-window
{ $description "Makes the native window containing the given gadget the front-most window." } ;
HELP: with-ui
{ $values { "quot" quotation } }
{ $description "Calls the quotation, starting the UI first if necessary." }
{ $notes "This combinator should be used in the " { $link POSTPONE: MAIN: } " word of a vocabulary, in order for the vocabulary to work when run from the UI listener (" { $snippet "\"my-app\" run" } " and the command line (" { $snippet "./factor -run=my-app" } ")." }
{ $examples "The " { $vocab-link "hello-ui" } " vocabulary implements a simple UI application which uses this combinator." } ;
{ $values { "quot" { $quotation "( -- )" } } }
{ $description "Calls the quotation, starting the UI first if necessary. If the UI is started, this word does not return." }
{ $notes "This word should be used in the " { $link POSTPONE: MAIN: } " word of an application that uses the UI in order for the vocabulary to work when run from either the UI listener (" { $snippet "\"my-app\" run" } " and the command line (" { $snippet "./factor -run=my-app" } ")." }
{ $examples "The " { $vocab-link "hello-ui" } " vocabulary implements a simple UI application which uses this word." } ;
HELP: beep
{ $description "Plays the system beep sound." } ;

View File

@ -207,7 +207,7 @@ M: object close-window
<flag> ui-notify-flag set-global
] "ui" add-startup-hook
: with-ui ( quot -- )
: with-ui ( quot: ( -- ) -- )
ui-running? [ call( -- ) ] [ '[ init-ui @ ] (with-ui) ] if ;
HOOK: beep ui-backend ( -- )