[FIX] ClassVarsFix-petervr (was: Sharedvariablesbinding/lookupbug)

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Oct 13 04:53:09 UTC 2003


Let's try something (in 3.5):

    |cs gs xs|
    cs := Object classVarNames copy.
    Object allSubclassesDo: [:each |
	cs addAll: each classVarNames].
    "cs size"			"1187"
    gs := Smalltalk keys asSet.
    "gs size"			"2122"
    xs := cs intersection: gs.
    "xs size"			"2"
    xs
==> a Set(#Error #InstanceBrowser)

    Object allSubclasses select: [:each
        each classVarNames includes: #Error]
==> a Set(AsyncFile)
    Object allSubclasses select: [:each
        each classVarNames includes: #InstanceBrowser]
==> a Set(#CRDictionary CRDisplayProperties)

Perhaps it would be clearer if AsyncFile were changed to use
BusyStatus and ErrorStatus instead.  Maybe that has already been done?

My point is that Tim is right that this kind of thing is confusing.
BUT we should be able to improve the interface to reduce the problems.
For example, Browser>>shiftedClassListMenu could get a new menu item
('risky class vars' showRiskyClassVars 'show a list of class variables
that have the same name as a global')
just after 'unreferenced class vars', with code similar to what I wrote
above to find the variables.  I'm too busy to do anything about it this week,
unfortunately.



More information about the Squeak-dev mailing list