Field gadget now has an action quotation

release
slava 2006-07-24 19:42:33 +00:00
parent fdc63f95c5
commit 60ca9804f1
4 changed files with 13 additions and 5 deletions

View File

@ -6,7 +6,8 @@
- scroll to caret
- clicking input doesn't resize editor gadget
- better listener multi-line expression handling
- C+p/C+n with empty history bombs
- C+p/C+n with loc out of range
- don't add empties to the editor history
- httpd search tools
- remaining HTML issues need fixing
@ -107,6 +108,11 @@
- the invalid recursion form case needs to be fixed, for inlines too
- code gc
+ something like masterscope:
- does word A call word B (indirectly)?
- which variables are read, written in a quotation
+ misc:
- consider: swap tail --> tail, swap head --> head

View File

@ -3,10 +3,11 @@
IN: gadgets-text
USING: gadgets gadgets-controls generic kernel models ;
TUPLE: field model ;
TUPLE: field model quot ;
C: field ( model -- field )
C: field ( model quot -- field )
<editor> over set-delegate
[ set-field-quot ] keep
[ set-field-model ] keep
dup dup set-control-self ;
@ -17,6 +18,7 @@ C: field ( model -- field )
: field-commit ( field -- string )
[ editor-text ] keep
dup field-model [ dupd set-model ] when*
dup field-quot [ dupd call ] when*
control-model dup add-history clear-doc ;
field H{

View File

@ -8,7 +8,7 @@ TUPLE: interactor output continuation ;
C: interactor ( output -- gadget )
[ set-interactor-output ] keep
f <field> over set-gadget-delegate
f f <field> over set-gadget-delegate
dup dup set-control-self ;
: interactor-eval ( string gadget -- )

View File

@ -13,7 +13,7 @@ TUPLE: search-gadget input ;
C: search-gadget ( quot -- )
>r f <model> dup r> {
{ [ <field> ] set-search-gadget-input f @top }
{ [ f <field> ] set-search-gadget-input f @top }
{ [ swap <search-pane> <scroller> ] f f @center }
} make-frame* ;