[squeak-dev] FileContentsBrowser issue
David T. Lewis
lewis at mail.msen.com
Fri Jan 18 01:20:40 UTC 2013
A proposed fix is in the inbox:
Only the instance of SystemOrganizer that is the global SystemOrganization
should send change notifications to the singleton SystemChangeNotifier.
Addresses the case of a FileContentsBrowser that uses a new SystemOrganization
to load code for browsing and should not initiate a system change notification
for the class being browsed, as reported by Bob Arning on squeak-dev
On Wed, Jan 16, 2013 at 12:39:57PM -0500, Bob Arning wrote:
> I'm not sure how many folks still use FileContentsBrowser, but there is
> a small issue:
> browseStream: aStream named: aString
> | browser |
> Cursor wait showWhile: [ | package packageDict organizer |
> packageDict := Dictionary new.
> browser := self new.
> organizer := SystemOrganizer defaultList: Array new.
> package := (FilePackage new fullName: aString; fileInFrom:
> at: package packageName
> put: package.
> *organizer **
> ** classifyAll: package classes keys **
> ** under: package packageName.*
> (browser := self systemOrganizer: organizer)
> packages: packageDict].
> openBrowserView: browser createViews
> label: 'File Contents Browser'.
> which soon leads to SystemOrganizer
> classify: element under: newCategory
> | oldCategory class |
> oldCategory := self categoryOfElement: element.
> super classify: element under: newCategory.
> class := Smalltalk at: element ifAbsent: [^ self].
> *SystemChangeNotifier uniqueInstance**
> ** class: class**
> ** recategorizedFrom: oldCategory**
> ** to: newCategory *
> which causes all known classes in the file being browsed to be added to
> the current change set as having a class definition change. Perhaps it
> makes sense to do the notification only if this SystemOrganizer is
> actually SystemOrganization.
More information about the Squeak-dev