#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Sun, 08 Jul 2018 16:43:38 +0200
changeset 3571 5ab5d55aec43
parent 3569 a84b410b96ac
child 3572 656e8b807454
#UI_ENHANCEMENT by cg class: MenuEditor::ImageResourceEditor changed: #doBrowseImageClass
MenuEditor.st
--- a/MenuEditor.st	Sat Jun 30 03:34:41 2018 +0000
+++ b/MenuEditor.st	Sun Jul 08 16:43:38 2018 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1997 by eXept Software AG
 	      All Rights Reserved
@@ -4386,8 +4384,12 @@
             Dialog warn:'No such resource retriever class.'.
         ] ifFalse:[
             (cls respondsTo:#visualFor:) ifTrue:[
-                image := cls visualFor:sel.
-                image ~~ (cls perform:sel ifNotUnderstood:nil) ifTrue:[
+                Error handle:[:ex |
+                    self warn:'The class seems to not understand #',sel.
+                ] do:[
+                    image := cls visualFor:sel.
+                ].
+                (image notNil and:[image ~~ (cls perform:sel ifNotUnderstood:nil)]) ifTrue:[
                     self warn:'The image as returned by #visualFor: is probably provided by another class.\\Showing all implementors of #',sel.
                     "/ sel := #visualFor:.
                     SystemBrowser default browseImplementorsOf:sel.
@@ -4400,6 +4402,7 @@
 
     "Created: / 20-09-2010 / 13:27:34 / cg"
     "Modified: / 01-09-2017 / 14:21:02 / cg"
+    "Modified: / 08-07-2018 / 15:41:37 / Claus Gittinger"
 !
 
 doEditImage