version 30854 On 21.05.2015 14:16, Nicolai Hess [via Smalltalk] wrote:
2015-05-21 13:05 GMT+02:00 webwarrior <[hidden email] </user/SendEmail.jtp?type=node&node=4827816&i=0>>:
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? (I have 30645)
self widget treeModel updateList
In Pharo 4: For some reason autoRefreshOnExpand was removed, and now we also have to manually reset children of all (at least all affected nodes). Something like this:
node widget widget setChildren: node widget childrenBlock
(where node is instance of TreeNodeModel; root nodes can be obtained by calling self widget treeModel rootNodes collect: #nodeModel)
However as this solution uses some implementation details, expect it to break at any time. Hey, they even change public API without warning (like mentioned autoRefreshOnExpand).
-- View this message in context: http://forum.world.st/Spec-TreeModel-dynamic-contents-tp4827440p4827812.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
------------------------------------------------------------------------ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Spec-TreeModel-dynamic-contents-tp4827440p4827816.html
To unsubscribe from Spec TreeModel dynamic contents, click here <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&nod...>. NAML <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant...>
-- View this message in context: http://forum.world.st/Spec-TreeModel-dynamic-contents-tp4827440p4827818.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.