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
|
- Building Factor
|
||||||
- Running Factor on Unix with X11
|
- Running Factor on Unix with X11
|
||||||
- Running Factor on Mac OS X
|
- Running Factor on Mac OS X
|
||||||
|
- Running Factor on Windows
|
||||||
- Source organization
|
- Source organization
|
||||||
- Community
|
- Community
|
||||||
- Credits
|
- Credits
|
||||||
|
@ -23,6 +24,7 @@ Factor is fully supported on the following platforms:
|
||||||
Linux/AMD64
|
Linux/AMD64
|
||||||
Mac OS X/x86
|
Mac OS X/x86
|
||||||
Mac OS X/PowerPC
|
Mac OS X/PowerPC
|
||||||
|
MS Windows XP
|
||||||
|
|
||||||
The following platforms should work, but are not tested on a
|
The following platforms should work, but are not tested on a
|
||||||
regular basis:
|
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
|
Factor.app runs the UI when double-clicked and can be transported
|
||||||
between PowerPC Macs.
|
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
|
* Source organization
|
||||||
|
|
||||||
doc/ - the developer's handbook, and various other bits and pieces
|
doc/ - the developer's handbook, and various other bits and pieces
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
+ tomorrow:
|
+ tomorrow:
|
||||||
|
|
||||||
- help gadget: opens 'f' initially
|
|
||||||
- amd64 crash
|
- amd64 crash
|
||||||
|
|
||||||
+ day after:
|
+ day after:
|
||||||
|
@ -21,6 +20,9 @@
|
||||||
|
|
||||||
+ ui:
|
+ 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?
|
- why is the thumb skewed?
|
||||||
- add some handy services:
|
- add some handy services:
|
||||||
- base conversion
|
- base conversion
|
||||||
|
|
|
@ -7,8 +7,8 @@ ARTICLE: "handbook" "Factor documentation"
|
||||||
{ $list
|
{ $list
|
||||||
{ "Load source files using " { $link run-file } ":"
|
{ "Load source files using " { $link run-file } ":"
|
||||||
{ $code "\"examples/lcd.factor\" run-file" } }
|
{ $code "\"examples/lcd.factor\" run-file" } }
|
||||||
{ "Load modules from " { $snippet "contrib/" } " using " { $link require } ":" }
|
{ { "Load modules from " { $snippet "contrib/" } " using " { $link require } ":" }
|
||||||
{ $code "\"httpd\" require" }
|
{ $code "\"httpd\" require" } }
|
||||||
{ { $link .s } " prints the contents of the stack." }
|
{ { $link .s } " prints the contents of the stack." }
|
||||||
{ { $link . } " prints the object at the top 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" } } ;
|
{ $code "X [ Y ] unless*" "X dup [ ] [ drop Y ] if" } } ;
|
||||||
|
|
||||||
HELP: ?if "( default cond true false -- )"
|
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."
|
{ $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
|
$terpri
|
||||||
"The following two lines are equivalent:"
|
"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 -- )"
|
HELP: keep-datastack "( quot -- )"
|
||||||
{ $values { "quot" "a quotation" } }
|
{ $values { "quot" "a quotation" } }
|
||||||
|
|
|
@ -45,7 +45,8 @@ M: incremental pref-dim* ( incremental -- dim )
|
||||||
over prefer-incremental
|
over prefer-incremental
|
||||||
2dup incremental-loc
|
2dup incremental-loc
|
||||||
tuck update-cursor
|
tuck update-cursor
|
||||||
prefer-incremental ;
|
dup prefer-incremental
|
||||||
|
gadget-parent [ invalidate* ] when* ;
|
||||||
|
|
||||||
: clear-incremental ( incremental -- )
|
: clear-incremental ( incremental -- )
|
||||||
dup (clear-gadget) dup forget-pref-dim
|
dup (clear-gadget) dup forget-pref-dim
|
||||||
|
|
|
@ -71,14 +71,13 @@ M: gadget ungraft* drop ;
|
||||||
%
|
%
|
||||||
] [ ] make call ;
|
] [ ] make call ;
|
||||||
|
|
||||||
: (parents) ( gadget vector -- )
|
: (parents) ( gadget -- )
|
||||||
over
|
[ dup , gadget-parent (parents) ] when* ;
|
||||||
[ 2dup push >r gadget-parent r> (parents) ] [ 2drop ] if ;
|
|
||||||
|
|
||||||
: parents ( gadget -- vector )
|
: parents ( gadget -- vector )
|
||||||
#! A list of all parents of the gadget, the first element
|
#! A list of all parents of the gadget, the first element
|
||||||
#! is the gadget itself.
|
#! is the gadget itself.
|
||||||
V{ } clone [ (parents) ] keep ;
|
[ (parents) ] { } make ;
|
||||||
|
|
||||||
: each-parent ( gadget quot -- ? )
|
: each-parent ( gadget quot -- ? )
|
||||||
>r parents r> all? ; inline
|
>r parents r> all? ; inline
|
||||||
|
@ -90,12 +89,6 @@ M: gadget ungraft* drop ;
|
||||||
#! The position of the gadget on the screen.
|
#! The position of the gadget on the screen.
|
||||||
parents { 0 0 } [ rect-loc v+ ] reduce ;
|
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- ;
|
: relative-loc ( g1 point -- point-g1 ) swap screen-loc v- ;
|
||||||
|
|
||||||
: child? ( parent child -- ? ) parents memq? ;
|
: child? ( parent child -- ? ) parents memq? ;
|
||||||
|
|
|
@ -39,6 +39,9 @@ M: help-gadget gadget-title
|
||||||
help-gadget-history
|
help-gadget-history
|
||||||
[ "Help - " swap article-title append ] <filter> ;
|
[ "Help - " swap article-title append ] <filter> ;
|
||||||
|
|
||||||
|
M: help-gadget pref-dim*
|
||||||
|
drop { 500 600 } ;
|
||||||
|
|
||||||
: help-tool
|
: help-tool
|
||||||
[ help-gadget? ]
|
[ help-gadget? ]
|
||||||
[ <help-gadget> ]
|
[ <help-gadget> ]
|
||||||
|
|
|
@ -83,7 +83,7 @@ C: titled-gadget ( gadget title -- )
|
||||||
[ world-gadget swap call ] find-last-with nip ; inline
|
[ world-gadget swap call ] find-last-with nip ; inline
|
||||||
|
|
||||||
: open-tool ( arg cons setter -- )
|
: 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 -- )
|
: call-tool ( arg pred cons setter -- )
|
||||||
rot find-window [
|
rot find-window [
|
||||||
|
|
Loading…
Reference in New Issue