Thanks to the TreeMorph Pharocast (thank you!) and some digging, I have added a context menu to a PluggableTreeMorph that lets me add a child to a selected node (I am just using the idea of nested "accounts"):
addAccount
��� | isExpanded |
��� aTreeMorph� selectedMorph complexContents item addAccount:
��� ��� (Account new accountName: (UIManager default request: 'Enter a new account name:')).
��� isExpanded := aTreeMorph selectedMorph isExpanded.
��� aTreeMorph toggleExpandedState: aTreeMorph selectedMorph.
��� isExpanded ifTrue: [aTreeMorph toggleExpandedState: aTreeMorph selectedMorph.]
But as you can see I can only figure out how to show new nodes by toggling the expanded state, which is really not helpful if you want to rename, delete, etc...� Is there a way to somehow just inform the PluggableTreeMorph to redraw itself after changing its contents?
Thank you,
Rob