.
[clean-tests.git] / test.icl
index 5da2a7b..0093bb4 100644 (file)
--- a/test.icl
+++ b/test.icl
@@ -1,39 +1,18 @@
 module test
-//
-//import Data.Func, StdFunctions, iTasks
-//
-//derive gDefault ChoiceNode
-//
-//Start w = flip doTasks w $
-//     withShared 5 \sharedInt->
-//     withShared [] \sharedSel->
-//     (editSharedSelectionWithShared 
-//             [SelectInTree
-//                     (\l->[{defaultValue & id=i,label=toString i}\\i<-[0..l]])
-//                     (\_ s->s)
-//             ] sharedInt sharedSel <<@ Title "Selection" <<@ multipleAttr False)
-//     -|| (updateSharedInformation [] sharedInt <<@ Title "Number of items")
-//     -|| (updateSharedInformation [] sharedSel <<@ Title "Current selection")
-//     >&> \sh->(viewSharedInformation [] (mapRead toSingleLineText sh) <<@ Title "Current task value" )
-//
-//from Data.Map import singleton
-//import Data.Map.GenJSON
-//import iTasks
-//
-//Start w = doTasks t w
-//
-//t :: Task [(Int, TaskValue Int)]
-//t = parallel
-//     [(Embedded, \stl->
-//             appendTask Embedded (\_->viewInformation [] 42) stl
-//             >>! \i->set (singleton "focus" (JSONBool True)) (sdsFocus i (taskListEntryMeta stl))
-//             >>~ \_->viewSharedInformation []
-//                     (sdsFocus {onlyIndex=Nothing,onlyTaskId=Nothing,onlySelf=False,includeValue=True,includeProgress=True,includeAttributes=True} stl)
-//             @! 42
-//     )] []
 
+//import Data.Func
 import iTasks
-Start w = doTasks t w
+
+Start w = doTasks (onStartup par) w
 where
-       t = viewInformation [ViewUsing id progressBar] (Just 80, Just "bork")
-               <<@ Title "bork"
+       par :: Task [(Int, TaskValue ())]
+       par = parallel [] []
+//Start w = doTasks (onStartup $ m >>- traceValue) w
+//
+//m = parallel
+//     [(Embedded, \stl->return 42)]
+//     []
+//     [OnValue $ \tv->case tv of
+//             NoValue = ?None
+//             _ = ?None
+//     ]