Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-23 Thread Offray Vladimir Luna Cárdenas
Hi Nicolai, About the rebuilding of the subwidgets, I really don't know. Maybe if I can force the highlighting I can't ignore the rebuilding issue in some way, so that's what I'm trying now and seems I'm closer. Do you know how to make a TreeNodeModel to show itself expanded? I tried with '#i

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-21 Thread Nicolai Hess
Hi Offrey, I think one problem is that the tree is always rebuild (on every selection?) even with self needRebuild:false tree needREbuild: false. all subwidgets of the notebook (tree and body) are removed and rebuild from changeBodys call to self buildWithSpecLayout: self class defaultSpec. I

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-18 Thread Offray Vladimir Luna Cárdenas
Hi all, Thanks Nicolai. Your examples helped me to advance and now I have the basic possibility to modify the tree. The two methods that did the trick are #addNode and #highlightNextitem, listed below, but I still get a MNU: receiver of "selectedMorphList is nil, anytime I try to highlight th

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-11 Thread Nicolai Hess
2016-08-10 21:03 GMT+02:00 Nicolai Hess : > > > 2016-08-10 20:42 GMT+02:00 Nicolai Hess : > >> >> >> 2016-08-10 19:12 GMT+02:00 Nicolai Hess : >> >>> >>> >>> 2016-08-10 19:05 GMT+02:00 Offray Vladimir Luna Cárdenas < >>> offray.l...@mutabit.com>: >>> Hi, I have been fighting with th

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-10 Thread Nicolai Hess
2016-08-10 20:42 GMT+02:00 Nicolai Hess : > > > 2016-08-10 19:12 GMT+02:00 Nicolai Hess : > >> >> >> 2016-08-10 19:05 GMT+02:00 Offray Vladimir Luna Cárdenas < >> offray.l...@mutabit.com>: >> >>> Hi, >>> >>> I have been fighting with this for several hours until now. I can't >>> understand how to

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-10 Thread Nicolai Hess
2016-08-10 19:12 GMT+02:00 Nicolai Hess : > > > 2016-08-10 19:05 GMT+02:00 Offray Vladimir Luna Cárdenas < > offray.l...@mutabit.com>: > >> Hi, >> >> I have been fighting with this for several hours until now. I can't >> understand how to manage change on selections on TreeModels with Spec, >> whi

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-10 Thread Nicolai Hess
2016-08-10 19:05 GMT+02:00 Offray Vladimir Luna Cárdenas < offray.l...@mutabit.com>: > Hi, > > I have been fighting with this for several hours until now. I can't > understand how to manage change on selections on TreeModels with Spec, > which is really frustrating > > Here is what I have: > >

Re: [Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-10 Thread Offray Vladimir Luna Cárdenas
Hi, I have been fighting with this for several hours until now. I can't understand how to manage change on selections on TreeModels with Spec, which is really frustrating Here is what I have: GrafoscopioNotebook>>initializePresenter tree whenSelectedItemChanged: [ :item | s

[Pharo-users] Spec > TreeModel: Updating the tree selection after a deletion

2016-08-07 Thread Offray Vladimir Luna Cárdenas
Hi, I have a Spec TreeModel to represent the GUI of a grafoscopio notebook. The message that deletes nodes is something like this: GrafoscopioNotebook>>removeNode | nodeToDelete | nodeToDelete := tree selectedItem content. nodeToDelete parent removeNode: nodeToDelete.

[Pharo-users] Spec TreeModel

2015-08-12 Thread Thomas Heniart
Hi, I'm using TreeModel>>beCheckList and I wanted to know if it is possible to dissociate the checkbox and label. More precisely, what I want is changing state by clicking on the checkbox only Is it possible ? Cheers, Thomas

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-21 Thread webwarrior
Actually, I may be using slightly newer version of Spec straight from github repository -- View this message in context: http://forum.world.st/Spec-TreeModel-dynamic-contents-tp4827440p4827820.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-21 Thread webwarrior
version 30854 On 21.05.2015 14:16, Nicolai Hess [via Smalltalk] wrote: > > > 2015-05-21 13:05 GMT+02:00 webwarrior <[hidden email] > >: > > Using lots of trial and error, I finally found a solution. Or, > rather a hack. > > In Pharo 3: > Just set autoRefreshOnExpand to true, and th

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-21 Thread Nicolai Hess
2015-05-21 13:05 GMT+02:00 webwarrior : > Using lots of trial and error, I finally found a solution. Or, rather a > hack. > > In Pharo 3: > Just set autoRefreshOnExpand to true, and then when there is need for > update, do: > > I can not find autoRefreshOnExpand anywhere in Pharo3.0. What version?

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-21 Thread webwarrior
Using lots of trial and error, I finally found a solution. Or, rather a hack. In Pharo 3: Just set autoRefreshOnExpand to true, and then when there is need for update, do: self widget treeModel updateList In Pharo 4: For some reason autoRefreshOnExpand was removed, and now we also have to manual

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-21 Thread Christophe Demarey
Le 19 mai 2015 à 18:04, webwarrior a écrit : > I want to make a tree using TreeModel that reacts to changes in underlying > data - when an item changes, tree node for that item should update its state > (recompute its children, etc.). > > Rebuilding the whole tree is ok, as long as selections an

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-20 Thread Thierry Goubier
Hi, I believe that you need to work a bit more at the Morphic level; MorphTreeMorph and MorphTreeNodeMorph have everything you need. The problem seems to be in the way Spec provides an API for those features (or does not provide an API). Regards, Thierry Le 20/05/2015 20:28, Nicolai Hess a

Re: [Pharo-users] Spec TreeModel dynamic contents

2015-05-20 Thread Nicolai Hess
2015-05-19 18:04 GMT+02:00 webwarrior : > I want to make a tree using TreeModel that reacts to changes in underlying > data - when an item changes, tree node for that item should update its > state > (recompute its children, etc.). > > Rebuilding the whole tree is ok, as long as selections and > c

[Pharo-users] Spec TreeModel dynamic contents

2015-05-19 Thread webwarrior
I want to make a tree using TreeModel that reacts to changes in underlying data - when an item changes, tree node for that item should update its state (recompute its children, etc.). Rebuilding the whole tree is ok, as long as selections and collapsed/expanded state of nodes are preserved. Using