Hi Steve,<br><br>ListItemWrapper was meant to be subclassed rather than used directly, and as you said its not simple at all. <br><br>Answering your question what you need to do is to have your own ListItemWrapper class and make it answer to #contents with an OrderedCollection of your item subitem´s ListItemWrapper instances.
<br><br>For a complete example of HierarchicalListMorph you can look how I did it in Jacaranda (look for it in Squeakmap, and in the DiagramOrganization classes).<br><br>hope it helps.<br><br>p.s. if you wish you can forward this mail to the beginners list. I am not subscribed.
<br><br>Regards,<br>Hernán<br><br><br><div><span class="gmail_quote">On 5/8/06, <b class="gmail_sendername">Steve Moffitt</b> &lt;<a href="mailto:stevia@citlink.net">stevia@citlink.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi -- I sent this to beginners list but didn't get a reply so will<br>try here.<br><br>Hi all -- and thanks in advance. I'm finding<br>SimpleHierarchaelListMorph not so simple. I can add items to the list<br>easily enough if code that follows is anywhere close to being right,
<br>but how would I add a subitem programactically to item 1.<br><br>x :=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleHierarchicalListMorph<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on: [ OrderedCollection with:&nbsp;&nbsp;(ListItemWrapper with: 'item 1')&nbsp;&nbsp;]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list: #value
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selected: nil<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changeSelected: nil<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;menu: nil<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keystroke: nil.<br><br>y := x&nbsp;&nbsp;getList.<br>y add: (ListItemWrapper with: 'item 2').
<br>x list: y.<br>x openInWorld<br><br>I've looked at the examples and still not getting it.<br>Again thanks,<br>Steve<br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Saludos,<br>Hernán<br>