Paste: Not a listbox
Author: | Muzzleflash |
Mode: | factor |
Date: | Fri, 29 May 2009 16:22:25 |
Plain Text |
USING: kernel io ui ui.gadgets.panes ui.gadgets ui.gadgets.scrollers ui.gadgets.editors ui.gadgets.packs ui.gadgets.labeled ;
IN: pane-receiver
: create-pane ( -- pane ) <pane> ;
: create-input-field ( pane -- action-field ) [ swap [ print ] curry with-pane ] curry <action-field> ;
: create-ui ( -- )
[
create-pane
dup create-input-field
[ "Pane" <labeled-gadget> ]
[ "Text Input" <labeled-gadget> ]
bi*
<pile>
[ [ swap add-gadget ] curry bi@ ] keep
"Testing" open-window
] with-ui ;
Author: | yebyen |
Mode: | factor |
Date: | Mon, 1 Jun 2009 04:38:52 |
Plain Text |
USING: ui.gadgets.pane
! latest factor as of today complains if you don't.
! not the only problem, unless I had a typo... something about wrong stack effect
! it seems to work though!
New Annotation