[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:
Name: System-dtl.512
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
http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167941.html
Dave
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:
> aStream).
> packageDict
> at: package packageName
> put: package.
> *organizer **
> ** classifyAll: package classes keys **
> ** under: package packageName.*
> (browser := self systemOrganizer: organizer)
> packages: packageDict].
> self
> 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.
>
> Cheers,
> Bob
>
More information about the Squeak-dev
mailing list
|