fp
[clean-tests.git] / filepicker / test.icl
index e885131..f308b33 100644 (file)
@@ -30,7 +30,8 @@ where
 selectFile :: FilePath -> Task FilePath
 selectFile root = get (sdsFocus root directoryShare)
        >>= \cs->withShared (RNode root (map fst cs)) \tree->
-       editSelectionWithShared () False selectOption tree :: !d !Bool !(SelectOption c a) (ReadWriteShared c w) (c -> [Int]) -> Task [a] 
+       editSelectionWithShared () False selectOption (mapRead numberTree tree)
+               (\tree->[i\\(i, (f, _))<-leafs tree])
 
 selectFile :: !FilePath !d !Bool [FilePath]-> Task [FilePath] | toPrompt d
 selectFile root prompt multi initial
@@ -74,3 +75,9 @@ where
                = (Ok $ sortBy fst [(f, fi)\\f<-files & fi<-fis], iw)
 
        write p w iw = (Ok (const (const False)), iw)
+//import iTasks
+//import iTasks.Extensions.Files
+//
+//Start w = startEngine (
+//     selectFile "/opt/clean/lib" () False []
+//     >&> viewSharedInformation "Selection" []) w