Make more code infer
parent
c4be8bd65a
commit
5aab0078a0
|
@ -70,7 +70,7 @@ CLASS: {
|
||||||
! Service support; evaluate Factor code from other apps
|
! Service support; evaluate Factor code from other apps
|
||||||
:: do-service ( pboard error quot -- )
|
:: do-service ( pboard error quot -- )
|
||||||
pboard error ?pasteboard-string
|
pboard error ?pasteboard-string
|
||||||
dup [ quot call ] when
|
dup [ quot call( string -- result/f ) ] when
|
||||||
[ pboard set-pasteboard-string ] when* ;
|
[ pboard set-pasteboard-string ] when* ;
|
||||||
|
|
||||||
CLASS: {
|
CLASS: {
|
||||||
|
|
|
@ -10,7 +10,7 @@ IN: ui.gadgets.presentations
|
||||||
TUPLE: presentation < button object hook ;
|
TUPLE: presentation < button object hook ;
|
||||||
|
|
||||||
: invoke-presentation ( presentation command -- )
|
: invoke-presentation ( presentation command -- )
|
||||||
[ [ dup hook>> call ] [ object>> ] bi ] dip
|
[ [ dup hook>> call( presentation -- ) ] [ object>> ] bi ] dip
|
||||||
invoke-command ;
|
invoke-command ;
|
||||||
|
|
||||||
: invoke-primary ( presentation -- )
|
: invoke-primary ( presentation -- )
|
||||||
|
|
|
@ -23,14 +23,14 @@ TUPLE: slot-editor < track ref close-hook update-hook text ;
|
||||||
} define-command
|
} define-command
|
||||||
|
|
||||||
: close ( slot-editor -- )
|
: close ( slot-editor -- )
|
||||||
dup close-hook>> call ;
|
dup close-hook>> call( slot-editor -- ) ;
|
||||||
|
|
||||||
\ close H{
|
\ close H{
|
||||||
{ +description+ "Close the slot editor without saving changes." }
|
{ +description+ "Close the slot editor without saving changes." }
|
||||||
} define-command
|
} define-command
|
||||||
|
|
||||||
: close-and-update ( slot-editor -- )
|
: close-and-update ( slot-editor -- )
|
||||||
[ update-hook>> call ] [ close ] bi ;
|
[ update-hook>> call( -- ) ] [ close ] bi ;
|
||||||
|
|
||||||
: slot-editor-value ( slot-editor -- object )
|
: slot-editor-value ( slot-editor -- object )
|
||||||
text>> control-value parse-fresh first ;
|
text>> control-value parse-fresh first ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ ui.gestures ;
|
||||||
IN: ui.operations
|
IN: ui.operations
|
||||||
|
|
||||||
: $operations ( element -- )
|
: $operations ( element -- )
|
||||||
>quotation call
|
>quotation call( -- obj )
|
||||||
f operations>commands
|
f operations>commands
|
||||||
command-map. ;
|
command-map. ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue