manageShares :: [MTaskShare] -> Task ()
manageShares shares = forever $
- /*viewSharesGrid shares -|| */viewShares shares @! ()
+ viewSharesGrid shares @! ()
// >&^ \st->whileUnchanged st $ \msh->case msh of
// Nothing = viewShares shares
// ) @! ()
-viewShares :: [MTaskShare] -> Task BCValue
-viewShares shares = anyTask (map viewShare shares)
-
-viewAndDelete :: [MTaskShare] -> Task ()
-viewAndDelete shares
- = enterChoice "Choose share to update" [ChooseFromGrid id] shares @! ()
+//viewShares :: [MTaskShare] -> Task BCValue
+//viewShares shares = anyTask (map viewShare shares)
+//
+//viewAndDelete :: [MTaskShare] -> Task ()
+//viewAndDelete shares
+// = enterChoice "Choose share to update" [ChooseFromGrid id] shares @! ()
//updateShare :: MTaskShare a -> Task MTaskShare | toByteCode, iTask a
//updateShare sh=:{withTask,identifier} a = getDeviceByName withTask
// >>= sendMessages [MTUpd identifier $ toString $ toByteCode a]
// >>| treturn sh
-//viewSharesGrid :: [MTaskShare] -> Task [MTaskShare]
-//viewSharesGrid sh = allTasks [whileUnchanged (get $ getSDSShare m) (\s->treturn (m, s))\\m<-sh]
-// @ map (\(s,v)->{MTaskShare|s&value=v})
-// >>= enterChoice "Choose share" [ChooseFromGrid id]
-// >>= \s->treturn [s]
-//{anyTask (map viewShare sh) <<@ ArrangeHorizontal
-// >>| return (hd sh)
+viewSharesGrid :: [MTaskShare] -> Task [BCValue]
+viewSharesGrid sh = allTasks [watch (getSDSShare m)\\m<-sh]
+ >&^ \st->whileUnchanged st $ \mshs->enterChoice "" [ChooseFromGrid id]
+ [{MTaskShare|ss&value=s}\\s<-fromJust mshs & ss<-sh]
+ @! fromJust mshs
+// /*enterChoice "" [ChooseFromGrid id]*/viewInformation "" [] o fromJust
viewShare :: MTaskShare -> Task BCValue
viewShare m = viewSharedInformation "" [] (getSDSShare m)
MTTaskDelAck i = deviceTaskDeleteAcked device i @! ()
_ = treturn ()
) >>| proc ms
-
- mapPar :: (a -> Task a) [a] -> Task ()
- mapPar f l = foldr1 (\x y->f x ||- y) l <<@ ArrangeWithTabs @! ()
- allAtOnce t = foldr1 (||-) t @! ()
- //allAtOnce = (flip (@!) ()) o foldr1 (||-)