mTasks can now be built with normal taskss
[mTask.git] / miTask.icl
index dfdcd30..a2ef345 100644 (file)
@@ -42,21 +42,18 @@ mTaskManager = anyTask
                        , arrangeSplit Vertical True
                        ]
 
-               viewmTasks = listmTasks
+               viewmTasks :: Task String
+               viewmTasks = enterChoiceWithShared "Available mTasks" [ChooseFromList id] mTaskTaskStore
                        >&^ \sh->whileUnchanged sh $ \mi->forever (case mi of
                                Nothing = viewInformation "No task selected" [] ()
                                Just mTaskTask = get deviceStore
                                        >>= \devices->case devices of
                                                [] = viewInformation "No devices yet" [] ()
-                                               ds = sendmTask mTaskTask ds @! ())
-                       where
-                               listmTasks :: Task String
-                               listmTasks = enterChoiceWithShared "Available mTasks" [ChooseFromList id] mTaskTaskStore
-
-                               sendmTask mTaskId ds = fromJust ('DM'.get mTaskId allmTasks)
-//                                     >>= \bc->(enterChoice "Choose Device" [ChooseFromDropdown \t->t.deviceName] ds
-//                                             -&&- enterInformation "Timeout, 0 for one-shot" [])
-//                                     >>* [OnAction (Action "Send") (withValue $ Just o sendToDevice bc)]
+                                               ds = fromJust ('DM'.get mTaskTask allmTasks)
+                                                       >>= \bc->(enterChoice "Choose Device" [ChooseFromDropdown \t->t.deviceName] ds
+                                                               -&&- enterInformation "Timeout, 0 for one-shot" []
+                                                       ) >>* [OnAction (Action "Send") (withValue $ Just o sendToDevice mTaskTask bc)]
+                               )
 
                process :: MTaskDevice (Shared Channels) -> Task ()
                process device ch = forever (watch ch >>* [OnValue (