#REFACTORING by exept
class: MenuEditor::ImageResourceEditor::ImageResourceEditorItem
changed: #forClass:selector: (send #argumentCount instead of #numArgs)
--- a/MenuEditor.st Sun Sep 08 15:37:49 2019 +0200
+++ b/MenuEditor.st Sun Sep 08 15:59:47 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -4642,32 +4644,32 @@
|w h magnify iconOrSymbol|
selector := aSelector asSymbol.
- selector numArgs == 0 ifFalse:[^ self].
+ selector argumentCount == 0 ifFalse:[^ self].
"do what the ResourceRetriever will do"
(aClass respondsTo:#visualFor:) ifTrue:[
- iconOrSymbol := aClass visualFor:selector.
+ iconOrSymbol := aClass visualFor:selector.
].
iconOrSymbol isNil ifTrue:[
- iconOrSymbol := aClass perform:selector.
+ iconOrSymbol := aClass perform:selector.
].
iconOrSymbol isNil ifTrue:[^ self].
iconOrSymbol isSymbol ifTrue:[
- icon := ToolbarIconLibrary perform:iconOrSymbol.
+ icon := ToolbarIconLibrary perform:iconOrSymbol.
] ifFalse:[
- icon := iconOrSymbol.
+ icon := iconOrSymbol.
].
w := icon width.
h := icon height.
w > 32 ifTrue:[
- magnify := 32 / w.
- h > 32 ifTrue:[ magnify := (32 / h) max:magnify ].
+ magnify := 32 / w.
+ h > 32 ifTrue:[ magnify := (32 / h) max:magnify ].
] ifFalse:[
- h > 32 ifFalse:[^ self].
- magnify := 32 / h.
+ h > 32 ifFalse:[^ self].
+ magnify := 32 / h.
].
icon := icon magnifiedBy: magnify.