|
From: <kr_...@us...> - 2003-07-04 17:41:06
|
Update of /cvsroot/htoolkit/gio/src/examples/simple
In directory sc8-pr-cvs1:/tmp/cvs-serv32308
Added Files:
ConfigKey.hs
Log Message:
Add example for configuration keys
--- NEW FILE: ConfigKey.hs ---
module Main where
import Graphics.UI.GIO
main =
start "Conf" "1.0" SDI [] $ do
(value :: Int) <- get pc (configKey "Counter.Value")
(delta :: Int) <- get pc (configKeyDef "Counter.Delta" 1)
set pc [configKey "Counter.Value" =: value+delta]
prompt <- get pc (configKeyDef "Prompt" "Counter.Value=")
w <- window []
l <- label [title =: prompt ++ show value] w
set w [layout =: l]
|