Ian,
Brilliant! :-) This is perfect! And, you know, whether one chooses to embolden the font, change its color or its icon, or set up a tree, doesn't really matter. But I like your approach: It tells me everything I need to know without any clutter. And it's a very instructive little enhancement. Those of us who are new to Smalltalk, and to Dolphin, can see the picture a little more clearly, particularly in terms of each subclass' successive contribution to the whole. My only disappointment is that I do believe I asked for a blue one ;). Kidding aside, thanks very much, and this definitely classifies as an IDB Goody. I hope that soon we, here, will feel comfortable making these kinds of change. Cheers, Eric > -----Original Message----- > From: Ian Bartholomew [mailto:[hidden email]] > Posted At: Saturday, June 03, 2006 2:32 AM > Posted To: comp.lang.smalltalk.dolphin > Conversation: Small Suggestion: Distinguishing Inherited Variables from > Class Variables > Subject: Re: Small Suggestion: Distinguishing Inherited Variables from > Class Variables > > OK, I've included a revised script below. This fixes the refresh problem > and also adds the update to the ExecutableBrowser. > > When making changes to the image, like this, it is best to do it as > transparently as possible and avoid modifying any existing methods. This > often results in code that is not as efficient or aesthetically pleasing > (very important!) as it would otherwise be. The way I've got around the > refresh problem in this script is a good example :-) > > ========== > !ClassBrowserAbstract methodsFor! > customDrawVariables: aNMLVCUSTOMDRAW > | variable | > variable := aNMLVCUSTOMDRAW item. > variable isNil ifTrue: [^self]. > self > emphasiseVariableItem: aNMLVCUSTOMDRAW > isRelevant: (classesPresenter actualClass instVarNames includes: > variable > value)! ! > !ClassBrowserAbstract categoriesFor: > #customDrawVariables:!helpers!private! > ! > > !ClassBrowserAbstract methodsFor! > emphasiseVariableItem: anNMTVCUSTOMDRAW isRelevant: aBoolean > anNMTVCUSTOMDRAW font isBold: aBoolean! ! > !ClassBrowserAbstract categoriesFor: > #emphasiseVariableItem:isRelevant:!helpers!private! ! > > !ClassBrowserShell methodsFor! > updateVariables > variablesPresenter model list: variablesPresenter model list , String > new. > ^super updateVariables! ! > !ClassBrowserShell categoriesFor: #updateVariables!public! ! > > !EnvironmentBrowserShell methodsFor! > updateVariables > variablesPresenter model list: variablesPresenter model list , String > new. > ^super updateVariables! ! > !EnvironmentBrowserShell categoriesFor: #updateVariables!public! ! > > !SystemBrowserShell methodsFor! > updateVariables > variablesPresenter model list: variablesPresenter model list , String > new. > ^super updateVariables! ! > !SystemBrowserShell categoriesFor: #updateVariables!public! ! > > | viewComposer subView | > viewComposer := ViewComposer show: 'Vertical view'. > viewComposer openOn: (ResourceIdentifier class: ClassBrowserShell > 'Default view'). > subView:= viewComposer composingView viewNamed: 'variables'. > subView customDrawBlock: [:ctx | ctx view presenter parentPresenter > customDrawVariables: ctx]. > viewComposer fileSave. > viewComposer openOn: (ResourceIdentifier class: SystemBrowserShell name: > 'Default view'). > subView:= viewComposer composingView viewNamed: 'variables'. > subView customDrawBlock: [:ctx | ctx view presenter parentPresenter > customDrawVariables: ctx]. > viewComposer fileSave. > viewComposer openOn: (ResourceIdentifier class: EnvironmentBrowserShell > name: 'Default view'). > subView:= viewComposer composingView viewNamed: 'variables'. > subView customDrawBlock: [:ctx | ctx view presenter parentPresenter > customDrawVariables: ctx]. > viewComposer fileSave. > > viewComposer exit > ========== > > -- > Ian > > Use the Reply-To address to contact me (limited validity). > Mail sent to the From address is ignored. > |
Free forum by Nabble | Edit this page |