Paste: github ui craches
Author: | xiackok |
Mode: | factor |
Date: | Thu, 27 Jan 2011 06:40:03 |
Plain Text |
USING: accessors colors.constants kernel models models.arrow
namespaces prettyprint ui ui.gadgets ui.gadgets.borders
ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels
ui.gadgets.tracks ui.pens.solid github models.product github ;
IN: fain
SYMBOL: github-info
SYMBOL: username
"" <model> username set-global
f <model> github-info set-global
: <get-button> ( -- button )
"Get"
[
drop
username get >>value
user-info
github-info set-model
] <border-button> ;
: <fain> ( -- fain )
vertical <track> { 5 5 } >>gap
"Enter github username for retrive info" <label> { 100 100 } >>dim
{ 0 0 } <border> 1 track-add
horizontal <track> { 5 5 } >>gap
username get <model-field> 1 track-add
<get-button> f track-add
f track-add
github-info get [ unparse ] <arrow> <label-control> 1 track-add ;
: run-fain ( -- )
[
<fain> { 10 10 } <border> COLOR: red <solid> >>boundary { 1 1 } >>fill
"Fain - Factor Github Client" open-window
] with-ui ;
MAIN: run-fain
New Annotation