diff --git a/basis/ui/ui-docs.factor b/basis/ui/ui-docs.factor index b2f97857f6..64eb5db07e 100644 --- a/basis/ui/ui-docs.factor +++ b/basis/ui/ui-docs.factor @@ -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." } ; diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index d55d1af096..1e5af88ac8 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -207,7 +207,7 @@ M: object close-window 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 ( -- )