+isSTScript query.
authorClaus Gittinger <cg@exept.de>
Wed, 06 Dec 2006 16:43:29 +0100
changeset 10231 905030724b3d
parent 10230 28c9ab0c0d43
child 10232 279546093a75
+isSTScript query.
Smalltalk.st
--- a/Smalltalk.st	Wed Dec 06 16:26:17 2006 +0100
+++ b/Smalltalk.st	Wed Dec 06 16:43:29 2006 +0100
@@ -17,7 +17,7 @@
 		NumberOfClassesHint SystemPath StartupClass StartupSelector
 		StartupArguments CommandLine CommandName CommandLineArguments
 		CachedAbbreviations SilentLoading Initializing StandAlone
-		HeadlessOperation IsPlugin IsSharedLibraryComponent
+		HeadlessOperation IsPlugin IsSharedLibraryComponent IsSTScript
 		DebuggingStandAlone LogDoits LoadBinaries RealSystemPath
 		ResourcePath SourcePath BinaryPath FileInPath PackagePath
 		BinaryDirName ResourceDirName SourceDirName BitmapDirName
@@ -1889,6 +1889,14 @@
     HeadlessOperation := aBoolean
 !
 
+beSTScript:aBoolean
+    "set/clear the isSTScript flag."
+
+    IsSTScript := aBoolean
+
+    "Created: / 06-12-2006 / 16:43:36 / cg"
+!
+
 standAloneApp:aBoolean
     "set/clear the StandAlone flag."
 
@@ -3422,6 +3430,18 @@
     "
 !
 
+isSTScript
+    "return true, if this is stscript. i.e. the stx scripting engine."
+
+    ^ IsSTScript ? false
+
+    "
+     Smalltalk isSTScript
+    "
+
+    "Created: / 06-12-2006 / 16:41:21 / cg"
+!
+
 isSharedLibraryComponent
     "return true, if this is a shared library component of another application
      i.e. a dll within another app."
@@ -3437,19 +3457,22 @@
 
 isSmalltalkDevelopmentSystem
     "return true, if this is a real smalltalk system
-     i.e. NOT a stripped & linked application (such as the webServer)
+     i.e. NOT a stripped or a linked application (such as the webServer)
      and NOT a plugIn (i.e. running in a browser)
-     and NOT a sharedLibrary component (i.e. a dll in another app)."
-
-    ^ self isPlugin not
-    and:[ self isSharedLibraryComponent not
-    and:[ self isStandAloneApp not ]]
+     and NOT a sharedLibrary component (i.e. a dll in another app).
+     This is used to determine, wether debugging is possible or not."
+
+    self isPlugin ifTrue:[^ false].                     "/ I am a browser-plugin
+    self isSharedLibraryComponent ifTrue:[^ false].     "/ I am a COM-ponent
+    self isSTScript ifTrue:[^ true ].                   "/ I am stScript
+    ^ self isStandAloneApp not.                         
 
     "
      Smalltalk isSmalltalkDevelopmentSystem
     "
 
     "Created: / 10-08-2006 / 13:12:49 / cg"
+    "Modified: / 06-12-2006 / 16:42:56 / cg"
 !
 
 isStandAloneApp
@@ -6970,5 +6993,5 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.795 2006-12-06 15:10:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.796 2006-12-06 15:43:29 cg Exp $'
 ! !