[vwnc] IconLibary & #classMethodsChanged bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] IconLibary & #classMethodsChanged bug

Holger Kleinsorgen-3
Howdy,

the implementation

   IconLibrary>>classMethodsChanged
     self default flush

should be changed to:

   IconLibrary>>classMethodsChanged
     default notNil ifTrue: [ default flush ]

With the original implementation, the following happens when an icon
library implements #defaultIconSize and returns something different from
20x20:
- code loader compiles an instance method, e.g. #availableIconSizes,
before #defaultIconSize is loaded/compiled
- this triggers instanceMethodsChanged
- "self default flush" creates the singleton, but since defaultIconSize
is not yet loaded, the instance will have a wrong value in the instVar
"iconSize"
- this library instance constructs wrong selectors, resulting in MNUs

of course, postponing classMethodsChanged/instanceMethodsChanged during
load until the load is complete would be the more general fix

cheers, Holger
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc