'From Squeak3.7beta of ''1 April 2004'' [latest update: #5905] on 29 April 2004 at 12:35:07 pm'! "Change Set: BrowserExplainTPR Date: 6 May 2003 Author: tim@sumeru.stanford.edu Trying to 'explain' a pool dictionary in the class definition view of a Browser didn't work. Not because the explain code can't do it but because it kept getting diverted to where it tries to find the string as a temporary variable of the selected method. Obviously one can't have much success in finding the temporaries in a class definition. The problem appears to be in the Browser>selectedMessageName code where #Definition or #Comment could be returned - thus confusing the explain code. So far as I can tell the only deliberate user of this was Browser> annotation which actually didn't need to use it. So I removed it and now explaining pooldicts works and nothing seems to have broken. However, #Definition etc are deeply intertwingled with the browser annotation stuff and although I haven't found anything to fail it may be that a quite different answer is required. Try Smalltalk browseAllCallsOn: #Definition to see some of the uses and consider how MessageSet>isPseudoSelector: is used. Suggestions from somebody that actually knows WTF is supposed to be going on would be helpful"! !StringHolder methodsFor: 'accessing' stamp: 'nk 4/29/2004 12:32'! classCommentIndicated "Answer true iff we're viewing the class comment." ^false! ! !StringHolder methodsFor: 'message list menu' stamp: 'nk 4/29/2004 12:32'! browseVersions "Create and schedule a Versions Browser, showing all versions of the currently selected message. Answer the browser or nil." | selector class | self classCommentIndicated ifTrue: [ ClassCommentVersionsBrowser browseCommentOf: self selectedClass. ^nil ]. (selector _ self selectedMessageName) ifNil:[ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ] ifNotNil: [ class _ self selectedClassOrMetaClass. ^VersionsBrowser browseVersionsOf: (class compiledMethodAt: selector) class: self selectedClass meta: class isMeta category: (class organization categoryOfElement: selector) selector: selector]! ! !CodeHolder methodsFor: 'self-updating' stamp: 'nk 4/29/2004 12:25'! didCodeChangeElsewhere "Determine whether the code for the currently selected method and class has been changed somewhere else." | aClass aSelector aCompiledMethod | currentCompiledMethod ifNil: [^ false]. (aClass := self selectedClassOrMetaClass) ifNil: [^ false]. (aSelector := self selectedMessageName) ifNil: [^ false]. self classCommentIndicated ifTrue: [^ currentCompiledMethod ~~ aClass organization commentRemoteStr]. ^ (aCompiledMethod := aClass compiledMethodAt: aSelector ifAbsent: [^ false]) ~~ currentCompiledMethod and: [aCompiledMethod last ~= 0 "either not yet installed" or: [ currentCompiledMethod last = 0 "or these methods don't have source pointers"]]! ! !Browser methodsFor: 'message list' stamp: 'tpr 5/6/2003 14:05'! selectedMessageName "Answer the message selector of the currently selected message, if any. Answer nil otherwise." | aList | messageListIndex = 0 ifTrue: [^ nil]. ^ (aList _ self messageList) size >= messageListIndex ifTrue: [aList at: messageListIndex] ifFalse: [nil]! ! !MessageSet methodsFor: 'metaclass' stamp: 'nk 4/29/2004 12:20'! classCommentIndicated "Answer true iff we're viewing the class comment." ^ editSelection == #editComment or: [ self selectedMessageName == #Comment ]! !