Fix problem where help window shows wrong page initially
parent
5b5b607b2a
commit
c5716ff2e1
12
README.txt
12
README.txt
|
@ -11,6 +11,7 @@ implementation. It is not an introduction to the language itself.
|
|||
- Building Factor
|
||||
- Running Factor on Unix with X11
|
||||
- Running Factor on Mac OS X
|
||||
- Running Factor on Windows
|
||||
- Source organization
|
||||
- Community
|
||||
- Credits
|
||||
|
@ -23,6 +24,7 @@ Factor is fully supported on the following platforms:
|
|||
Linux/AMD64
|
||||
Mac OS X/x86
|
||||
Mac OS X/PowerPC
|
||||
MS Windows XP
|
||||
|
||||
The following platforms should work, but are not tested on a
|
||||
regular basis:
|
||||
|
@ -137,6 +139,16 @@ this point), and the library source into a self-contained Factor.app.
|
|||
Factor.app runs the UI when double-clicked and can be transported
|
||||
between PowerPC Macs.
|
||||
|
||||
* Running Factor on Windows
|
||||
|
||||
If you did not download the binary package, you can bootstrap Factor in
|
||||
the command prompt:
|
||||
|
||||
f.exe boot.image.pentium4 (or boot.image.x86)
|
||||
|
||||
Once bootstrapped, double-clicking f.exe starts the Factor UI. There is
|
||||
no option to run the listener in the command prompt on Windows.
|
||||
|
||||
* Source organization
|
||||
|
||||
doc/ - the developer's handbook, and various other bits and pieces
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
+ tomorrow:
|
||||
|
||||
- help gadget: opens 'f' initially
|
||||
- amd64 crash
|
||||
|
||||
+ day after:
|
||||
|
@ -21,6 +20,9 @@
|
|||
|
||||
+ ui:
|
||||
|
||||
- markup: goofy if a block is the first thing in a table cell
|
||||
- ui uses too much cpu time idling
|
||||
- table borders rendered badly
|
||||
- why is the thumb skewed?
|
||||
- add some handy services:
|
||||
- base conversion
|
||||
|
|
|
@ -7,8 +7,8 @@ ARTICLE: "handbook" "Factor documentation"
|
|||
{ $list
|
||||
{ "Load source files using " { $link run-file } ":"
|
||||
{ $code "\"examples/lcd.factor\" run-file" } }
|
||||
{ "Load modules from " { $snippet "contrib/" } " using " { $link require } ":" }
|
||||
{ $code "\"httpd\" require" }
|
||||
{ { "Load modules from " { $snippet "contrib/" } " using " { $link require } ":" }
|
||||
{ $code "\"httpd\" require" } }
|
||||
{ { $link .s } " prints the contents of the stack." }
|
||||
{ { $link . } " prints the object at the top of the stack." }
|
||||
}
|
||||
|
|
|
@ -240,11 +240,11 @@ $terpri
|
|||
{ $code "X [ Y ] unless*" "X dup [ ] [ drop Y ] if" } } ;
|
||||
|
||||
HELP: ?if "( default cond true false -- )"
|
||||
{ $values { "cond" "a generalized boolean" } { "true" "a quotation with stack effect " { $snippet "( cond -- )" } } { "false" "a quotation with stack effect " { $snippet "( default -- )" } } }
|
||||
{ $values { "default" "an object" } { "cond" "a generalized boolean" } { "true" "a quotation with stack effect " { $snippet "( cond -- )" } } { "false" "a quotation with stack effect " { $snippet "( default -- )" } } }
|
||||
{ $description "If the condition is " { $link f } ", the " { $snippet "false" } " quotation is called with the " { $snippet "default" } " value on the stack. Otherwise, the " { $snippet "true" } " quotation is called with the condition on the stack."
|
||||
$terpri
|
||||
"The following two lines are equivalent:"
|
||||
{ $code "X [ Y ] [ Z ] ?if" "X dup [ nip Y ] [ drop Z ] if" } } ;
|
||||
{ $code "[ X ] [ Y ] ?if" "dup [ nip X ] [ drop Y ] if" } } ;
|
||||
|
||||
HELP: keep-datastack "( quot -- )"
|
||||
{ $values { "quot" "a quotation" } }
|
||||
|
|
|
@ -45,7 +45,8 @@ M: incremental pref-dim* ( incremental -- dim )
|
|||
over prefer-incremental
|
||||
2dup incremental-loc
|
||||
tuck update-cursor
|
||||
prefer-incremental ;
|
||||
dup prefer-incremental
|
||||
gadget-parent [ invalidate* ] when* ;
|
||||
|
||||
: clear-incremental ( incremental -- )
|
||||
dup (clear-gadget) dup forget-pref-dim
|
||||
|
|
|
@ -71,14 +71,13 @@ M: gadget ungraft* drop ;
|
|||
%
|
||||
] [ ] make call ;
|
||||
|
||||
: (parents) ( gadget vector -- )
|
||||
over
|
||||
[ 2dup push >r gadget-parent r> (parents) ] [ 2drop ] if ;
|
||||
: (parents) ( gadget -- )
|
||||
[ dup , gadget-parent (parents) ] when* ;
|
||||
|
||||
: parents ( gadget -- vector )
|
||||
#! A list of all parents of the gadget, the first element
|
||||
#! is the gadget itself.
|
||||
V{ } clone [ (parents) ] keep ;
|
||||
[ (parents) ] { } make ;
|
||||
|
||||
: each-parent ( gadget quot -- ? )
|
||||
>r parents r> all? ; inline
|
||||
|
@ -90,12 +89,6 @@ M: gadget ungraft* drop ;
|
|||
#! The position of the gadget on the screen.
|
||||
parents { 0 0 } [ rect-loc v+ ] reduce ;
|
||||
|
||||
: gadget-point ( gadget vector -- point )
|
||||
#! { 0 0 } - top left corner
|
||||
#! { 1/2 1/2 } - middle
|
||||
#! { 1 1 } - bottom right corner
|
||||
>r dup screen-loc swap rect-dim r> v* v+ ;
|
||||
|
||||
: relative-loc ( g1 point -- point-g1 ) swap screen-loc v- ;
|
||||
|
||||
: child? ( parent child -- ? ) parents memq? ;
|
||||
|
|
|
@ -39,6 +39,9 @@ M: help-gadget gadget-title
|
|||
help-gadget-history
|
||||
[ "Help - " swap article-title append ] <filter> ;
|
||||
|
||||
M: help-gadget pref-dim*
|
||||
drop { 500 600 } ;
|
||||
|
||||
: help-tool
|
||||
[ help-gadget? ]
|
||||
[ <help-gadget> ]
|
||||
|
|
|
@ -83,7 +83,7 @@ C: titled-gadget ( gadget title -- )
|
|||
[ world-gadget swap call ] find-last-with nip ; inline
|
||||
|
||||
: open-tool ( arg cons setter -- )
|
||||
>r call tuck r> call open-window ; inline
|
||||
>r call dup open-window r> call ; inline
|
||||
|
||||
: call-tool ( arg pred cons setter -- )
|
||||
rot find-window [
|
||||
|
|
Loading…
Reference in New Issue