Tools_ClassChecker.st
changeset 8484 eec9dc678f00
parent 8483 e0c4a5a168dd
child 9253 684c9ecf8d17
equal deleted inserted replaced
8483:e0c4a5a168dd 8484:eec9dc678f00
   290                   name := (mthd mclass name , ' ', mthd selector).
   290                   name := (mthd mclass name , ' ', mthd selector).
   291                   name ~= key ifTrue:[
   291                   name ~= key ifTrue:[
   292                       self 
   292                       self 
   293                           rememberBadMethod:mthd 
   293                           rememberBadMethod:mthd 
   294                           key:#invalidKeyInImageResourceMethod
   294                           key:#invalidKeyInImageResourceMethod
   295                           info:('key in constantNamed: does not match the method name')
       
   296                   ]
       
   297               ]
       
   298            ]
       
   299         ]
       
   300     ].
       
   301 !
       
   302 
       
   303 invalidkeyInImageResourceMethod
       
   304     Icon flushCachedIcons.
       
   305     checkedClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | 
       
   306         |img key name|
       
   307 
       
   308         (mthd hasResource:#image) ifTrue:[
       
   309            img := mthd valueWithReceiver:nil arguments:#().
       
   310            key := (Icon classVarAt:#KnownIcons) keyAtIdentityValue:img.
       
   311            key notNil ifTrue:[
       
   312               mthd mclass notNil ifTrue:[  
       
   313                   name := (mthd mclass name , ' ', mthd selector).
       
   314                   name ~= key ifTrue:[
       
   315                       self 
       
   316                           rememberBadMethod:mthd 
       
   317                           key:#invalidkeyInImageResourceMethod
       
   318                           info:('key in constantNamed: does not match the method name')
   295                           info:('key in constantNamed: does not match the method name')
   319                   ]
   296                   ]
   320               ]
   297               ]
   321            ]
   298            ]
   322         ]
   299         ]
   868 ! !
   845 ! !
   869 
   846 
   870 !ClassChecker class methodsFor:'documentation'!
   847 !ClassChecker class methodsFor:'documentation'!
   871 
   848 
   872 version
   849 version
   873     ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassChecker.st,v 1.12 2008-12-07 23:14:26 cg Exp $'
   850     ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassChecker.st,v 1.13 2008-12-07 23:15:30 cg Exp $'
   874 ! !
   851 ! !