I installed ghc 6.6.1 and 0.9.12.1. I'm trying to use the tree view widget.
To enable search in treeview, I added following 2 lines:
New.treeViewAppendColumn view col3
-- my addition
New.treeViewSetEnableSearch view True
New.treeViewSetSearchColumn view 0
in demo/treeList/TreeDemo.hs
Hi,
There doesn't seem to be a function to search the tree so
I come up with following function:
searchTree :: (a - Bool) - TreeLoc a - Maybe (TreeLoc a)
searchTree pred rootLoc =
if pred (getLabel rootLoc) then
Just rootLoc
else case firstChild rootLoc of
Just loc - case
I somehow cannot figure this out. Tree is Foldable so I
can use find on it. But how can I use find on TreeLoc?
Am I missing something obvious?
Dan Weston weston...@imageworks.com wrote:
I think you want
find :: Foldable t = (a - Bool) - t a - Maybe a
Jian Fan wrote:
Hi,
There doesn't
Well, TreeLoc comes from Data.Tree.Zipper which comes from rosezipper
packge. Thank you and MightyByte. Its much improved now.
Jian
Yitzchak Gale g...@sefer.org wrote:
Jian Fan wrote:
I somehow cannot figure this out. Tree is Foldable so I
can use find on it. But how can I use find on TreeLoc
siblings loc = searchTree2 pred loc `mplus`
(searchTree2 pred = right loc)
On Mon, Mar 8, 2010 at 1:11 PM, Jian Fan abe...@gmail.com wrote:
Hi,
There doesn't seem to be a function to search the tree so
I come up with following function:
searchTree :: (a - Bool
Hi all,
This is my first post. Inspired by Don's hmp3, I've started
my pet project hxine: A Haskell music player using Xine engine.
This was long time ago and I just picked this thing up again:
darcs get http://lintao.org/repos/hxine
To play CD:
./hxine cd:/
./hxine cd://2-
./hxine cd://-5
to