+generate false return method
authorClaus Gittinger <cg@exept.de>
Mon, 15 Oct 2012 22:17:01 +0200
changeset 11841 8df2e8a1dc3e
parent 11840 abf92167eea8
child 11842 70180ac9f3bf
+generate false return method
SmalltalkCodeGeneratorTool.st
--- a/SmalltalkCodeGeneratorTool.st	Mon Oct 15 20:46:00 2012 +0200
+++ b/SmalltalkCodeGeneratorTool.st	Mon Oct 15 22:17:01 2012 +0200
@@ -1733,6 +1733,24 @@
     ].
 !
 
+createFalseReturnMethodFor:aSelector category:cat in:aClass
+    "add a ^ false method;
+     but only if not already present."
+
+    (aClass includesSelector:aSelector) ifFalse:[
+
+        self compile:
+(Method methodDefinitionTemplateForSelector:aSelector) ,
+'
+    "return false here; to be redefined in subclass(es)"
+
+    ^ false
+' 
+              forClass:aClass 
+              inCategory:cat.
+    ].
+!
+
 createImageSpecMethodFor:anImage comment:comment in:aClass selector:sel
     |imageStoreStream mthd imageKey category|
 
@@ -2490,11 +2508,11 @@
 !SmalltalkCodeGeneratorTool class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.16 2012-08-21 10:28:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.17 2012-10-15 20:17:01 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.16 2012-08-21 10:28:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.17 2012-10-15 20:17:01 cg Exp $'
 !
 
 version_SVN