In a Dolphin smalltalk treeview I'd like to use a custom icon, depending on the state of the item displayed, (differente state, different icon) How can I do that ?
I cannot really understand how to use a "my" icon. I've create a class "connection", with an instance variable "connected" and two class methods "connectedIcon and unconnectedIcon that returns icon images. Then an instance function "icon" that returns one or the other image based on the connection state.
I can add instances of this class to a tree view and see the name of the connections. But how to show my Icons ?
I tried to sustitute the getImageBlock of my presenter view with the following expression [:obj | obj icon] but it doesn't work. (nothing seems to happen).
this is made in my presenter initialize :
initialize super initialize. treePresenter view getImageBlock: [:obj | obj icon]
what's wrong with it ? best regards Maurizio