Issue #78: Do not show confusing error message when in UI painter mode jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 15 Apr 2016 18:27:48 +0100
branchjv
changeset 5024 228412f59c2c
parent 5023 be867ba2b22f
child 5025 22261417679a
Issue #78: Do not show confusing error message when in UI painter mode The workkaround is certainly ugly, but see comment in the code. I'd like to avoid forking yet another package if possible. https://swing.fit.cvut.cz/projects/stx-jv/ticket/78
MenuPanel.st
--- a/MenuPanel.st	Sat Apr 09 08:56:37 2016 +0100
+++ b/MenuPanel.st	Fri Apr 15 18:27:48 2016 +0100
@@ -6879,17 +6879,25 @@
 
     app := menuPanel application.
 
+    "/ JV@2016-04-15: Fix for https://swing.fit.cvut.cz/projects/stx-jv/ticket/78
+    "/ The isKinfOf: below is a super ugly, whip me hard,
+    "/ but a correct fix, i.e., adding isUIPainter to UISelectionPanel
+    "/ would require to fork stx:libtool2 which I'd like to avoid for now.
+    "/ If more fixes would go to stx:libtool2 then I will fork, and
+    "/ remove this code.
     (menuPanel receiver isNil
     and:[ app notNil
-    and:[ app askFor:#isUIPainter]])
+    and:[ (app askFor:#isUIPainter) or:[app isKindOf: (Smalltalk at:#UISelectionPanel)]]])
     ifTrue:[
-	^ self "/ suppressed
+        ^ self "/ suppressed
     ].
     aMessage infoPrint.
 "/    app notNil ifTrue:[
 "/        ' Application: ' infoPrint. app infoPrint
 "/    ].
     '' infoPrintCR.
+
+    "Modified: / 15-04-2016 / 18:24:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 indication
@@ -9266,6 +9274,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !