[Pharo-users] How to programatically select an item in a Spec TreeModel ?
edouardklein at gmail.com
Mon Oct 26 06:38:36 EDT 2015
What is FT ?
I did some debugging. When I send the selected:#true message to a root
node, it goes down to the Morphic classes, and everything is fine, when I
send it to a child node, the dependents array of the TreeNodeModel is nil,
so nobody gets the message. I don't know enough about Spec yet to
understand what dependents are and why there are none on a child node.
Because I really need to get this done quickly, I will try to write a quick
and dirty fix in a subclass that will directly talk to the morphic objects
Now, with some guidance from you guys, I would be really happy to take some
time and write some useful code that could solve this problem correctly,
and have it commited for anyone to use. But first, in order to justify to
my employer that coding with Pharo was a good choice, I need to make my
I'll update here as I go.
On Sun, 25 Oct 2015 at 09:10 Thierry Goubier <thierry.goubier at gmail.com>
> Le 24/10/2015 13:20, Ferlicot D. Cyril a écrit :
> > Le 24/10/2015 08:11, Peter Uhnák a écrit :
> >> Waiting for the FT-based rewrite is the thing to do.
> >> If by waiting you mean doing FT-based rewrite, then sure. :)
> >> Unless Cyril is going to do the rewrite himself.
> >> P
> > Hi,
> > Create a FTTree should be my next work :)
> > I already begun a FTTree with one sublevel but this is only a first
> > shot. I think it's possible to do cleaner and faster.
> With the FT core code, I'm having success mapping the tree to an array
> (i.e. providing an #at: anIndex) for the tree. But then, need to
> optimise #at: (or the FT code iterating over the tree with #at:).
> Note that the widget should not have a knowledge of the tree depth (or
> the depth of an item of the tree). Otherwise the code becomes very
> complex (i.e. PluggableTreeMorph and MorphTreeMorph), for no good reason
> at all.
> Enjoy your design ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users