#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 05 Oct 2016 17:15:49 +0200
changeset 16901 0023fed870de
parent 16900 1bd3cf6ce330
child 16902 cc814affa81d
#FEATURE by cg class: CodeGeneratorTool changed: #createStandaloneStartupCodeFor: main on inst-side; orward from classes main
CodeGeneratorTool.st
--- a/CodeGeneratorTool.st	Wed Oct 05 17:15:25 2016 +0200
+++ b/CodeGeneratorTool.st	Wed Oct 05 17:15:49 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -1191,17 +1189,24 @@
             inCategory:'startup'.
     ].
     (metaClass includesSelector:#'main:') ifFalse:[
-        txt := self codeFor_standAloneMain.
+        txt := self codeFor_standAloneMainOnClassSide.
         self
             compile:(txt bindWith:className)
             forClass:metaClass 
             inCategory:'startup'.
+    ].
+    (nonMetaclass includesSelector:#'main:') ifFalse:[
+        txt := self codeFor_standAloneMain.
+        self
+            compile:(txt bindWith:className)
+            forClass:nonMetaclass 
+            inCategory:'startup'.
 
-        (metaClass includesSelector:#'realMain:') ifFalse:[
+        (nonMetaclass includesSelector:#'realMain:') ifFalse:[
             txt := self codeFor_standAloneRealMainMethodFor:nonMetaclass.
             self
                 compile:(txt bindWith:className)
-                forClass:metaClass 
+                forClass:nonMetaclass 
                 inCategory:'startup'.
         ].