implementation module Shares.mTaskShare
import Utils.SDS
+import Utils.Devices
import iTasks
+import mTask
from Data.Func import $
manageShares :: [MTaskShare] -> Task ()
Nothing = viewShares shares @! zero
Just sh = forever (
viewSharedInformation "View value" [] (getSDSStore sh)
- >>* [OnAction (Action "Update") (withValue $ Just $ updateInformation "New value" [])]
+ >>* [OnAction (Action "Update") (withValue (Just o updateInformation "New value" []))]
>>= updateShare sh
)
) @! ()
-updateShare :: MTaskShare Int -> Task MTaskShare
-updateShare sh=:{withTask} i = return sh
+updateShare :: MTaskShare a -> Task MTaskShare | toByteCode a
+updateShare sh=:{withTask,identifier} a = getDeviceByName withTask
+ >>= sendMessages [MTUpd identifier $ toString $ toByteCode a]
+ >>| treturn sh
viewShares :: [MTaskShare] -> Task ()