# HG changeset patch # User Jan Vrany # Date 1302369544 -3600 # Node ID 04ff72c5039a94c5734dff4a07e8da62a3ddbfff # Parent 1602a49e146ebae36e30de519f3c3c0c4c040ad9 Merged with /trunk diff -r 1602a49e146e -r 04ff72c5039a AbortAllOperationRequest.st --- a/AbortAllOperationRequest.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AbortAllOperationRequest.st Sat Apr 09 18:19:04 2011 +0100 @@ -57,14 +57,44 @@ " ! ! +!AbortAllOperationRequest class methodsFor:'special handling'! + +handleAndAnswerQueryIn:aBlock + "evaluate aBlock, and return immediately, if the AbortAllRequest is raised. + Answer any query if AllOperationWanted with true." + + self handle:[:ex | + ] do:[ + AbortAllOperationWantedQuery + answer:true + do:aBlock + ]. + + " + AbortAllOperationRequest handleAndAnswerQueryIn:[ + AbortAllOperationWantedQuery query ifTrue:[ + self halt. + AbortAllOperationRequest raise. + ]. + ]. + " + + "Created: / 09-02-2011 / 13:58:01 / cg" +! ! + !AbortAllOperationRequest class methodsFor:'documentation'! version - ^ '$Id: AbortAllOperationRequest.st 10517 2010-04-26 18:26:38Z vranyj1 $' + ^ '$Id: AbortAllOperationRequest.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: AbortAllOperationRequest.st 10517 2010-04-26 18:26:38Z vranyj1 $' + ^ '$Id: AbortAllOperationRequest.st 10632 2011-04-09 17:19:04Z vranyj1 $' +! + +version_CVS + ^ 'Header: /var/local/cvs/stx/libbasic/AbortAllOperationRequest.st,v 1.8 2011-02-09 12:59:00 cg Exp ' ! ! AbortAllOperationRequest initialize! + diff -r 1602a49e146e -r 04ff72c5039a AbortAllOperationWantedQuery.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AbortAllOperationWantedQuery.st Sat Apr 09 18:19:04 2011 +0100 @@ -0,0 +1,71 @@ +" + COPYRIGHT (c) 2011 by eXept Software AG + All Rights Reserved + + This software is furnished under a license and may be used + only in accordance with the terms of that license and with the + inclusion of the above copyright notice. This software may not + be provided or otherwise made available to, or used by, any + other person. No title to or ownership of the software is + hereby transferred. +" +"{ Package: 'stx:libbasic' }" + +Query subclass:#AbortAllOperationWantedQuery + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Exceptions-Control' +! + +!AbortAllOperationWantedQuery class methodsFor:'documentation'! + +copyright +" + COPYRIGHT (c) 2011 by eXept Software AG + All Rights Reserved + + This software is furnished under a license and may be used + only in accordance with the terms of that license and with the + inclusion of the above copyright notice. This software may not + be provided or otherwise made available to, or used by, any + other person. No title to or ownership of the software is + hereby transferred. +" +! + +documentation +" + A query to ask, if AbortAllOperationRequest should be offered via an extra + button from a dialog. + + This is used by dialog boxes, to decide if an extra 'Abort All' button should be + shown, in situations where an operation might be issued both for a single item + or for a group of items, and it is not known at the place where the dialog is shown, + if it is part of a group-operation. +" +! ! + +!AbortAllOperationWantedQuery methodsFor:'defaults'! + +defaultResumeValue + ^ false + + " + AbortAllOperationWantedQuery query + + AbortAllOperationWantedQuery + answer:true + do:[ + AbortAllOperationWantedQuery query + ]. + " + + "Created: / 09-02-2011 / 11:42:28 / cg" +! ! + +!AbortAllOperationWantedQuery class methodsFor:'documentation'! + +version_CVS + ^ '§Header: /var/local/cvs/stx/libbasic/AbortAllOperationWantedQuery.st,v 1.2 2011-02-09 10:44:37 cg Exp §' +! ! diff -r 1602a49e146e -r 04ff72c5039a AbstractOperatingSystem.st --- a/AbstractOperatingSystem.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AbstractOperatingSystem.st Sat Apr 09 18:19:04 2011 +0100 @@ -599,7 +599,9 @@ html documents, pdf documents etc. operationSymbol is one of: open - edit" + edit + explore + " "/ use a fileBrowser UserPreferences current fileBrowserClass openOn:aFilenameOrString @@ -612,6 +614,7 @@ " "Created: / 29-10-2010 / 12:16:38 / cg" + "Modified: / 05-02-2011 / 16:13:42 / cg" ! ! !AbstractOperatingSystem class methodsFor:'error messages'! @@ -3128,6 +3131,14 @@ " ! +getAllProcesses + "get a list of the running OS processes. + Some OperatingSystems (Windows) support this. + The default is to answer an empty list." + + ^ #(). +! + getVMSSymbol:aSymbolString "get a symbols value, or nil if there is none" @@ -4041,7 +4052,7 @@ This method might be redefined in concrete OS's to add OS-specific directory names." - |packagePath dirName homeDirName priv userPrivateSTXDir appDir topDirName| + |packagePath dirName homeDirName priv userPrivateSTXDir appDirName appDir topDirName| " the path is set to search files first locally @@ -4056,6 +4067,15 @@ packagePath add:('.' "Filename currentDirectory pathName"). "/ + "/ the executable's directory: + "/ (/opt/stx/bin/stx -> /opt/stx/bin) + "/ + appDirName := self pathOfSTXExecutable asFilename directory. + (packagePath includes:appDirName) ifFalse:[ + packagePath add:appDirName. + ]. + + "/ "/ the executable's parent directory: "/ (/opt/stx/bin/stx -> /opt/stx/packages) "/ @@ -4134,7 +4154,7 @@ OperatingSystem defaultPackagePath " - "Modified: / 24.12.1999 / 00:31:29 / cg" + "Modified: / 04-02-2011 / 16:27:15 / cg" ! defaultSystemPath @@ -7005,15 +7025,15 @@ !AbstractOperatingSystem class methodsFor:'documentation'! version - ^ '$Id: AbstractOperatingSystem.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: AbstractOperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.207 2011/01/24 13:17:37 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/AbstractOperatingSystem.st,v 1.210 2011-03-08 17:48:53 stefan Exp ' ! version_SVN - ^ '$Id: AbstractOperatingSystem.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: AbstractOperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! AbstractOperatingSystem initialize! @@ -7024,3 +7044,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a AbstractSourceFileReader.st --- a/AbstractSourceFileReader.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AbstractSourceFileReader.st Sat Apr 09 18:19:04 2011 +0100 @@ -73,15 +73,15 @@ !AbstractSourceFileReader class methodsFor:'documentation'! version - ^ '$Id: AbstractSourceFileReader.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AbstractSourceFileReader.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/AbstractSourceFileReader.st,v 1.5 2010/08/08 12:38:42 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/AbstractSourceFileReader.st,v 1.5 2010-08-08 12:38:42 cg Exp §' ! version_SVN - ^ '$Id: AbstractSourceFileReader.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AbstractSourceFileReader.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -89,3 +89,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a AbstractSourceFileWriter.st --- a/AbstractSourceFileWriter.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AbstractSourceFileWriter.st Sat Apr 09 18:19:04 2011 +0100 @@ -188,18 +188,19 @@ !AbstractSourceFileWriter class methodsFor:'documentation'! version - ^ '$Id: AbstractSourceFileWriter.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AbstractSourceFileWriter.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/AbstractSourceFileWriter.st,v 1.6 2009/10/08 12:03:57 fm Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/AbstractSourceFileWriter.st,v 1.6 2009-10-08 12:03:57 fm Exp §' ! version_SVN - ^ '$Id: AbstractSourceFileWriter.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AbstractSourceFileWriter.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a AbstractTime.st --- a/AbstractTime.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AbstractTime.st Sat Apr 09 18:19:04 2011 +0100 @@ -1180,15 +1180,15 @@ !AbstractTime class methodsFor:'documentation'! version - ^ '$Id: AbstractTime.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: AbstractTime.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.73 2011/01/24 19:55:34 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/AbstractTime.st,v 1.73 2011-01-24 19:55:34 stefan Exp ' ! version_SVN - ^ '$Id: AbstractTime.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: AbstractTime.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -1197,3 +1197,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ApplicationDefinition.st --- a/ApplicationDefinition.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ApplicationDefinition.st Sat Apr 09 18:19:04 2011 +0100 @@ -1669,15 +1669,12 @@ %(MAKE_PREREQUISITES) # a nullsoft installable delivery -setup: install_%(APPLICATION).exe +# This uses the Nullsoft Installer Package and works in Windows only +setup: $(PROJECT) postBuildCleanup %(NSI_FILENAME) + $(MAKENSIS) %(NSI_FILENAME) newBuildDate: - del buildDate.h - -# This uses the Nullsoft Installer Package and works in Windows only - -install_%(APPLICATION).exe: $(PROJECT) postBuildCleanup %(NSI_FILENAME) - $(MAKENSIS) %(NSI_FILENAME) + del buildDate.h new: $(MAKE_BAT) clean @@ -2861,21 +2858,23 @@ ! isProjectDefinition - ^ self ~~ ApplicationDefinition + ^ self ~~ ApplicationDefinition "/ skip myself - I am abstract "Created: / 17-08-2006 / 14:11:56 / cg" + "Modified: / 08-02-2011 / 10:03:34 / cg" ! ! !ApplicationDefinition class methodsFor:'documentation'! version - ^ '$Id: ApplicationDefinition.st 10617 2011-03-03 22:52:11Z vranyj1 $' + ^ '$Id: ApplicationDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ApplicationDefinition.st,v 1.170 2011/01/31 21:25:34 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ApplicationDefinition.st,v 1.172 2011-02-08 09:04:05 cg Exp ' ! version_SVN - ^ '$Id: ApplicationDefinition.st 10617 2011-03-03 22:52:11Z vranyj1 $' + ^ '$Id: ApplicationDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ArithmeticValue.st --- a/ArithmeticValue.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ArithmeticValue.st Sat Apr 09 18:19:04 2011 +0100 @@ -1333,15 +1333,15 @@ !ArithmeticValue class methodsFor:'documentation'! version - ^ '$Id: ArithmeticValue.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ArithmeticValue.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ArithmeticValue.st,v 1.87 2010/08/09 17:52:46 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ArithmeticValue.st,v 1.87 2010-08-09 17:52:46 cg Exp ' ! version_SVN - ^ '$Id: ArithmeticValue.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ArithmeticValue.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ArithmeticValue initialize! @@ -1352,3 +1352,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Array.st --- a/Array.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Array.st Sat Apr 09 18:19:04 2011 +0100 @@ -2527,18 +2527,19 @@ !Array class methodsFor:'documentation'! version - ^ '$Id: Array.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Array.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Array.st,v 1.149 2010/09/21 06:57:51 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Array.st,v 1.149 2010-09-21 06:57:51 stefan Exp ' ! version_SVN - ^ '$Id: Array.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Array.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Association.st --- a/Association.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Association.st Sat Apr 09 18:19:04 2011 +0100 @@ -173,18 +173,19 @@ !Association class methodsFor:'documentation'! version - ^ '$Id: Association.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Association.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Association.st,v 1.23 2009/10/06 15:16:10 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Association.st,v 1.23 2009-10-06 15:16:10 cg Exp ' ! version_SVN - ^ '$Id: Association.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Association.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Autoload.st --- a/Autoload.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Autoload.st Sat Apr 09 18:19:04 2011 +0100 @@ -760,18 +760,51 @@ ^ LoadedClasses includes:aClass ! ! +!Autoload class methodsFor:'utilities'! + +withClass:aClass loadedDo:aBlock + "ensure that aClass is loaded, while evaluating aBlock for it" + + |wasLoaded loadedClass| + + wasLoaded := aClass isLoaded. + wasLoaded ifTrue:[ + ^ aBlock value:aClass + ]. + + ParserFlags + withSTCCompilation:#never + do:[ + loadedClass := aClass autoload. + ]. + + + ^ [ + aBlock value:loadedClass + ] ensure:[ + aClass unload + ] + + " + Autoload withClass:Array loadedDo:[:cls | self assert:cls isLoaded] + Autoload withClass:Cons loadedDo:[:cls | self assert:cls isLoaded] + " + + "Created: / 08-02-2011 / 20:01:32 / cg" +! ! + !Autoload class methodsFor:'documentation'! version - ^ '$Id: Autoload.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Autoload.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.157 2010/03/13 11:36:57 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Autoload.st,v 1.158 2011-02-08 19:03:57 cg Exp ' ! version_SVN - ^ '$Id: Autoload.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Autoload.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Autoload initialize! @@ -780,3 +813,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a AutoloadMetaclass.st --- a/AutoloadMetaclass.st Wed Apr 06 13:25:19 2011 +0100 +++ b/AutoloadMetaclass.st Sat Apr 09 18:19:04 2011 +0100 @@ -101,18 +101,19 @@ !AutoloadMetaclass class methodsFor:'documentation'! version - ^ '$Id: AutoloadMetaclass.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AutoloadMetaclass.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/AutoloadMetaclass.st,v 1.8 2010/04/03 10:47:04 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/AutoloadMetaclass.st,v 1.8 2010-04-03 10:47:04 cg Exp ' ! version_SVN - ^ '$Id: AutoloadMetaclass.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: AutoloadMetaclass.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Bag.st --- a/Bag.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Bag.st Sat Apr 09 18:19:04 2011 +0100 @@ -416,18 +416,19 @@ !Bag class methodsFor:'documentation'! version - ^ '$Id: Bag.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Bag.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Bag.st,v 1.41 2010/03/30 13:38:23 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Bag.st,v 1.41 2010-03-30 13:38:23 stefan Exp ' ! version_SVN - ^ '$Id: Bag.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Bag.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Behavior.st --- a/Behavior.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Behavior.st Sat Apr 09 18:19:04 2011 +0100 @@ -3155,49 +3155,6 @@ "Created: / 06-08-2006 / 15:23:57 / cg" ! -isSubclassOf:aClass - "return true, if I am a subclass of the argument, aClass" - -%{ /* NOCONTEXT */ - OBJ __theClass = __INST(superclass); - - while (__theClass != nil) { - if (__theClass == aClass) { - RETURN(true); - } - if (__isBehaviorLike(__theClass)) { - __theClass = __ClassInstPtr(__theClass)->c_superclass; - } else { - __theClass = nil; - } - } - RETURN (false); -%}. - -"/ |theClass| -"/ -"/ theClass := superclass. -"/ [theClass notNil] whileTrue:[ -"/ (theClass == aClass) ifTrue:[^ true]. -"/%{ -"/ if (__isBehaviorLike(theClass)) { -"/ theClass = __ClassInstPtr(theClass)->c_superclass; -"/ } else { -"/ theClass = nil; -"/ } -"/%}. -"/"/ theClass := theClass superclass. -"/ ]. -"/ ^ false - - " - String isSubclassOf:Collection - LinkedList isSubclassOf:Array - 1 isSubclassOf:Number <- will fail since 1 is no class - Number isSubclassOf:1 - " -! - isVisualStartable ^ false @@ -3449,6 +3406,22 @@ ^ false ! +includesBehavior:aClass + "return true, if the receiver includes the behavior of aClass; + i.e. if is either identical to a class or inherits from it." + + ^ (self == aClass) or:[self isSubclassOf:aClass] + + " + True includesBehavior:Object + True includesBehavior:Boolean + True includesBehavior:True + True includesBehavior:False + " + + "Modified: 19.6.1997 / 18:14:35 / cg" +! + inheritsFrom:aClass "return true, if the receiver inherits methods from aClass; i.e. if aClass is on the receivers superclass chain." @@ -3463,6 +3436,49 @@ "Modified: 19.6.1997 / 18:13:21 / cg" ! +isSubclassOf:aClass + "return true, if I am a subclass of the argument, aClass" + +%{ /* NOCONTEXT */ + OBJ __theClass = __INST(superclass); + + while (__theClass != nil) { + if (__theClass == aClass) { + RETURN(true); + } + if (__isBehaviorLike(__theClass)) { + __theClass = __ClassInstPtr(__theClass)->c_superclass; + } else { + __theClass = nil; + } + } + RETURN (false); +%}. + +"/ |theClass| +"/ +"/ theClass := superclass. +"/ [theClass notNil] whileTrue:[ +"/ (theClass == aClass) ifTrue:[^ true]. +"/%{ +"/ if (__isBehaviorLike(theClass)) { +"/ theClass = __ClassInstPtr(theClass)->c_superclass; +"/ } else { +"/ theClass = nil; +"/ } +"/%}. +"/"/ theClass := theClass superclass. +"/ ]. +"/ ^ false + + " + String isSubclassOf:Collection + LinkedList isSubclassOf:Array + 1 isSubclassOf:Number <- will fail since 1 is no class + Number isSubclassOf:1 + " +! + subclasses "return a collection of the direct subclasses of the receiver" @@ -4259,22 +4275,6 @@ "Modified: 10.2.1996 / 13:15:56 / cg" ! -includesBehavior:aClass - "return true, if the receiver includes the behavior of aClass; - i.e. if is either identical to a class or inherits from it." - - ^ (self == aClass) or:[self isSubclassOf:aClass] - - " - True includesBehavior:Object - True includesBehavior:Boolean - True includesBehavior:True - True includesBehavior:False - " - - "Modified: 19.6.1997 / 18:14:35 / cg" -! - includesSelector:aSelector "return true, if the methodDictionary of THIS class includes a method for aSelector. (i.e. if aSelector is implemented in THIS class - NOT in a superclass). @@ -4713,16 +4713,17 @@ !Behavior class methodsFor:'documentation'! version - ^ '$Id: Behavior.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Behavior.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.307 2011/01/31 10:12:36 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Behavior.st,v 1.308 2011-03-19 13:45:35 cg Exp ' ! version_SVN - ^ '$Id: Behavior.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Behavior.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Block.st --- a/Block.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Block.st Sat Apr 09 18:19:04 2011 +0100 @@ -2950,15 +2950,15 @@ !Block class methodsFor:'documentation'! version - ^ '$Id: Block.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Block.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Block.st,v 1.184 2011/01/18 18:24:31 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Block.st,v 1.184 2011-01-18 18:24:31 cg Exp ' ! version_SVN - ^ '$Id: Block.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Block.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Block initialize! @@ -2972,3 +2972,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Boolean.st --- a/Boolean.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Boolean.st Sat Apr 09 18:19:04 2011 +0100 @@ -229,18 +229,19 @@ !Boolean class methodsFor:'documentation'! version - ^ '$Id: Boolean.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Boolean.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.41 2010/11/17 14:59:49 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Boolean.st,v 1.41 2010-11-17 14:59:49 cg Exp ' ! version_SVN - ^ '$Id: Boolean.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Boolean.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ByteArray.st --- a/ByteArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ByteArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -2989,15 +2989,15 @@ !ByteArray class methodsFor:'documentation'! version - ^ '$Id: ByteArray.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ByteArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.204 2011/01/18 17:09:02 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ByteArray.st,v 1.204 2011-01-18 17:09:02 cg Exp ' ! version_SVN - ^ '$Id: ByteArray.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ByteArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -3006,3 +3006,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a CharacterArray.st --- a/CharacterArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -1508,6 +1508,7 @@ ! ! + !CharacterArray methodsFor:'character searching'! includesMatchCharacters @@ -2330,14 +2331,61 @@ "/ 'asd "hello bla" foo "bla bla" bar' asCollectionOfSubstringsSeparatedBy:$ exceptIn:$" ! -asCollectionOfSubstringsSeparatedBy: aFieldSeparator textSeparator:aTextSeparatorOrNil - "return a collection containing the words (separated by aFieldSeparator) - of the receiver. This allows breaking up csv strings." - - ^ self asCollectionOfSubstringsSeparatedByAll: aFieldSeparator - -"/ '"First", "Second,SecondAdd", "Third"' asCollectionOfSubstringsSeparatedBy:',' textSeparator: '"' -"/ 'First,Second,Third' asCollectionOfSubstringsSeparatedBy:',' textSeparator: nil +asCollectionOfSubstringsSeparatedBy:aFieldSeparator textSeparator:aTextSeparatorOrNil + "return a collection containing the words (separated by aFieldSeparator) of the receiver. + Individual words might be enclosed in aTextSeparator characters, in case they contain blanks or fieldSeparators. + Typically used for CSV line parsing, with a $; as aFieldSeparator and $'' (dquote) as textSeparator." + + |items myClass scanningWord + inStream element| + + aTextSeparatorOrNil isNil ifTrue:[ + ^ self asCollectionOfSubstringsSeparatedByAll: aFieldSeparator + ]. + + items := OrderedCollection new. + myClass := self species. + + inStream := ReadStream on:self. + [ + inStream skipSeparators. + inStream atEnd + ] whileFalse:[ + inStream peek == aTextSeparatorOrNil ifTrue:[ + inStream next. + element := ''. + scanningWord := true. + [ inStream atEnd not and:[scanningWord] ] whileTrue:[ + element := element , (inStream upTo:aTextSeparatorOrNil). + (inStream peek == aTextSeparatorOrNil) ifTrue:[ + element := element , aTextSeparatorOrNil. + inStream next. + ] ifFalse:[ + scanningWord := false. + ]. + ]. + inStream upToAllExcluding:aFieldSeparator. + ] ifFalse:[ + element := inStream upToAllExcluding:aFieldSeparator + ]. + items add:element. + ]. + + ^ items + + " + self assert:(('#First#, #Second,SecondAdd#, #Third#' asCollectionOfSubstringsSeparatedBy:',' textSeparator: $#) + sameContentsAs:#('First' 'Second,SecondAdd' 'Third')) + self assert:(('#Fir##st#, #Second,SecondAdd#, #Third#' asCollectionOfSubstringsSeparatedBy:',' textSeparator: $#) + sameContentsAs:#('Fir#st' 'Second,SecondAdd' 'Third')) + self assert:(('#Fir##st#, Second,SecondAdd, #Third#' asCollectionOfSubstringsSeparatedBy:',' textSeparator: $#) + sameContentsAs:#('Fir#st' 'Second' 'SecondAdd' 'Third')) + " + " + 'First,Second,Third' asCollectionOfSubstringsSeparatedBy:',' textSeparator: nil + " + + "Modified: / 07-04-2011 / 13:23:19 / cg" ! asCollectionOfSubstringsSeparatedByAll:aSeparatorString @@ -4726,6 +4774,7 @@ "Modified: 17.4.1997 / 12:50:23 / cg" ! ! + !CharacterArray methodsFor:'special string converting'! expandPlaceholdersWith:argArrayOrDictionary @@ -5901,15 +5950,15 @@ !CharacterArray class methodsFor:'documentation'! version - ^ '$Id: CharacterArray.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: CharacterArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.446 2011/01/09 09:38:33 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/CharacterArray.st,v 1.448 2011-04-07 11:23:33 cg Exp ' ! version_SVN - ^ '$Id: CharacterArray.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: CharacterArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! CharacterArray initialize! @@ -5924,3 +5973,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoder.st --- a/CharacterEncoder.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoder.st Sat Apr 09 18:19:04 2011 +0100 @@ -227,7 +227,7 @@ (EncoderClassesByName at:#'unicode') at:encodingNameSymbol put:NullEncoder. "/ self error:'no encoder for ' , encodingNameSymbol mayProceed:true. - ('CharacterEncoder [warning]: no encoder for ' , encodingNameSymbol) errorPrintCR. + ('CharacterEncoder [warning]: no encoder for ' , encodingNameSymbol) infoPrintCR. NullEncoderInstance ] @@ -253,7 +253,7 @@ self encoderFor:#'java' " - "Modified: / 23-10-2006 / 13:33:01 / cg" + "Modified: / 01-04-2011 / 14:27:22 / cg" ! encoderFor:encodingNameSymbolArg ifAbsent:exceptionValue @@ -550,6 +550,7 @@ ud at:#'fontspecific' put:NullEncoder. ud at:#'adobe-fontspecific' put:NullEncoder. ud at:#'ms-oem' put:NullEncoder. + ud at:#'ms-default' put:NullEncoder. "/ className decoded-name array-of-encodingNames #( @@ -700,7 +701,7 @@ self initialize " - "Modified: / 23-10-2006 / 13:33:39 / cg" + "Modified: / 01-04-2011 / 14:30:06 / cg" ! ! !CharacterEncoder class methodsFor:'constants'! @@ -1622,15 +1623,15 @@ !CharacterEncoder class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/CharacterEncoder.st,v 1.108 2010/09/20 16:00:45 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/CharacterEncoder.st,v 1.110 2011-04-01 12:30:14 cg Exp ' ! version_SVN - ^ '$Id: CharacterEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! CharacterEncoder initialize! @@ -1639,3 +1640,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__EBCDIC.st --- a/CharacterEncoderImplementations__EBCDIC.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__EBCDIC.st Sat Apr 09 18:19:04 2011 +0100 @@ -623,6 +623,7 @@ !EBCDIC class methodsFor:'documentation'! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/CharacterEncoderImplementations__EBCDIC.st,v 1.1 2010/09/20 15:26:46 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/CharacterEncoderImplementations__EBCDIC.st,v 1.1 2010-09-20 15:26:46 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__ISO10646_to_UTF16BE.st --- a/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__ISO10646_to_UTF16BE.st Sat Apr 09 18:19:04 2011 +0100 @@ -264,18 +264,19 @@ !ISO10646_to_UTF16BE class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoderImplementations__ISO10646_to_UTF16BE.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__ISO10646_to_UTF16BE.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Encoder_ISO10646_to_UTF16BE.st,v 1.3 2009/11/04 00:46:08 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Encoder_ISO10646_to_UTF16BE.st,v 1.3 2009-11-04 00:46:08 cg Exp ' ! version_SVN - ^ '$Id: CharacterEncoderImplementations__ISO10646_to_UTF16BE.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__ISO10646_to_UTF16BE.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__JIS0208_to_SJIS.st --- a/CharacterEncoderImplementations__JIS0208_to_SJIS.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__JIS0208_to_SJIS.st Sat Apr 09 18:19:04 2011 +0100 @@ -339,15 +339,16 @@ !JIS0208_to_SJIS class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoderImplementations__JIS0208_to_SJIS.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__JIS0208_to_SJIS.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Encoder_SJIS.st,v 1.12 2009/11/05 16:26:27 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Encoder_SJIS.st,v 1.12 2009-11-05 16:26:27 stefan Exp ' ! version_SVN - ^ '$Id: CharacterEncoderImplementations__JIS0208_to_SJIS.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__JIS0208_to_SJIS.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__MAC_Roman.st --- a/CharacterEncoderImplementations__MAC_Roman.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__MAC_Roman.st Sat Apr 09 18:19:04 2011 +0100 @@ -965,10 +965,11 @@ !MAC_Roman class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoderImplementations__MAC_Roman.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__MAC_Roman.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Encoder_MAC_Roman.st,v 1.4 2011/01/29 20:33:33 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Encoder_MAC_Roman.st,v 1.4 2011-01-29 20:33:33 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__SingleByteEncoder.st --- a/CharacterEncoderImplementations__SingleByteEncoder.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__SingleByteEncoder.st Sat Apr 09 18:19:04 2011 +0100 @@ -73,18 +73,19 @@ !SingleByteEncoder class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoderImplementations__SingleByteEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__SingleByteEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Encoder_SingleByteEncoder.st,v 1.9 2009/12/11 16:54:15 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Encoder_SingleByteEncoder.st,v 1.9 2009-12-11 16:54:15 cg Exp ' ! version_SVN - ^ '$Id: CharacterEncoderImplementations__SingleByteEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__SingleByteEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterEncoderImplementations__TwoByteEncoder.st --- a/CharacterEncoderImplementations__TwoByteEncoder.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterEncoderImplementations__TwoByteEncoder.st Sat Apr 09 18:19:04 2011 +0100 @@ -79,18 +79,19 @@ !TwoByteEncoder class methodsFor:'documentation'! version - ^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Encoder_TwoByteEncoder.st,v 1.6 2009/11/04 00:47:35 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Encoder_TwoByteEncoder.st,v 1.6 2009-11-04 00:47:35 cg Exp ' ! version_SVN - ^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterEncoderImplementations__TwoByteEncoder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a CharacterWriteStream.st --- a/CharacterWriteStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CharacterWriteStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -240,18 +240,19 @@ !CharacterWriteStream class methodsFor:'documentation'! version - ^ '$Id: CharacterWriteStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterWriteStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.9 2009/10/05 09:20:25 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/CharacterWriteStream.st,v 1.9 2009-10-05 09:20:25 cg Exp ' ! version_SVN - ^ '$Id: CharacterWriteStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CharacterWriteStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Class.st --- a/Class.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Class.st Sat Apr 09 18:19:04 2011 +0100 @@ -5174,16 +5174,17 @@ !Class class methodsFor:'documentation'! version - ^ '$Id: Class.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Class.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Class.st,v 1.579 2011/01/18 19:41:48 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Class.st,v 1.579 2011-01-18 19:41:48 cg Exp ' ! version_SVN - ^ '$Id: Class.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Class.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ClassBuildError.st --- a/ClassBuildError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ClassBuildError.st Sat Apr 09 18:19:04 2011 +0100 @@ -37,18 +37,19 @@ !ClassBuildError class methodsFor:'documentation'! version - ^ '$Id: ClassBuildError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ClassBuildError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ClassBuildError.st,v 1.2 2009/09/29 19:32:30 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ClassBuildError.st,v 1.2 2009-09-29 19:32:30 cg Exp ' ! version_SVN - ^ '$Id: ClassBuildError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ClassBuildError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ClassBuilder.st --- a/ClassBuilder.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ClassBuilder.st Sat Apr 09 18:19:04 2011 +0100 @@ -2229,15 +2229,15 @@ !ClassBuilder class methodsFor:'documentation'! version - ^ '$Id: ClassBuilder.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ClassBuilder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.99 2011/01/30 09:59:26 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ClassBuilder.st,v 1.99 2011-01-30 09:59:26 cg Exp ' ! version_SVN - ^ '$Id: ClassBuilder.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ClassBuilder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -2247,3 +2247,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ClassDescription.st --- a/ClassDescription.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ClassDescription.st Sat Apr 09 18:19:04 2011 +0100 @@ -4105,15 +4105,15 @@ !ClassDescription class methodsFor:'documentation'! version - ^ '$Id: ClassDescription.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ClassDescription.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.215 2011/01/18 17:07:42 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ClassDescription.st,v 1.215 2011-01-18 17:07:42 cg Exp ' ! version_SVN - ^ '$Id: ClassDescription.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ClassDescription.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ClassDescription initialize! @@ -4126,3 +4126,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Collection.st --- a/Collection.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Collection.st Sat Apr 09 18:19:04 2011 +0100 @@ -259,7 +259,6 @@ ^ self withSize:n ! ! - !Collection class methodsFor:'Signal constants'! emptyCollectionSignal @@ -480,7 +479,6 @@ ]. ! ! - !Collection methodsFor:'accessing'! anElement @@ -1236,23 +1234,27 @@ !Collection methodsFor:'bulk operations'! abs - "Absolute value of all elements in the collection" + "absolute value of all elements in the collection" ^ self collect: [:a | a abs] " TestCase assert:( { 1. -2. -3. 4 } abs = { 1. 2. 3. 4 }). " + + "Modified: / 18-03-2011 / 10:33:50 / cg" ! negated - "Negated value of all elements in the collection" + "negated value of all elements in the collection" ^ self collect:[:a | a negated] " TestCase assert:( { 1. -2. -3. 4 } negated = { -1. 2. 3. -4 }). " + + "Modified: / 18-03-2011 / 10:33:53 / cg" ! product @@ -1386,6 +1388,9 @@ ! asFlatOrderedCollection + "return a new ordered collection containing all elements of the receiver + and recursively of all collectionelements from the receiver" + |coll| coll := OrderedCollection new. @@ -1398,8 +1403,11 @@ 4 5 (6) 7 - (8 (9 10) 11 12 (13 (14 (15) 16)))) asFlatOrderedCollection + (8 (9 10) 11 12 (13 (14 (15) 16))) + ) asFlatOrderedCollection " + + "Modified: / 20-03-2011 / 22:02:36 / cg" ! asFloatArray @@ -2792,11 +2800,19 @@ !Collection methodsFor:'operations'! decrementAt:aKey + "decrement the value at aKey by one" + self at:aKey put:(self at:aKey) - 1. + + "Modified: / 18-03-2011 / 10:32:04 / cg" ! incrementAt:aKey + "increment the value at aKey by one" + self at:aKey put:(self at:aKey) + 1. + + "Modified: / 18-03-2011 / 10:31:57 / cg" ! ! !Collection methodsFor:'printing & storing'! @@ -3023,6 +3039,18 @@ !Collection methodsFor:'queries'! +average + "average value of all elements in the collection" + + ^ self sum / self size + + " + TestCase assert:( { 1. 2. 3. 4 } average = 2.5). + " + + "Created: / 18-03-2011 / 10:31:04 / cg" +! + defaultElement ^ nil ! @@ -3253,7 +3281,7 @@ maxApplying:aBlock "return the maximum value from applying aBlock to each element in the receiver collection, - using < to compare elements. + using aBlock to compare elements. Raises an error, if the receiver is empty." self emptyCheck. @@ -3275,6 +3303,7 @@ " "Created: / 23-08-2010 / 11:02:50 / cg" + "Modified: / 18-03-2011 / 10:32:29 / cg" ! min @@ -3304,7 +3333,7 @@ minApplying:aBlock "return the minimum value from applying aBlock to each element in the receiver collection, - using < to compare elements. + using aBlock to compare elements. Raises an error, if the receiver is empty." self emptyCheck. @@ -3326,6 +3355,7 @@ " "Created: / 23-08-2010 / 11:01:42 / cg" + "Modified: / 18-03-2011 / 10:32:33 / cg" ! minMax @@ -3872,15 +3902,15 @@ !Collection class methodsFor:'documentation'! version - ^ '$Id: Collection.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Collection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Collection.st,v 1.253 2011/01/22 08:13:45 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Collection.st,v 1.256 2011-03-20 21:52:46 cg Exp ' ! version_SVN - ^ '$Id: Collection.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Collection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Collection initialize! @@ -3893,3 +3923,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a CompiledCode.st --- a/CompiledCode.st Wed Apr 06 13:25:19 2011 +0100 +++ b/CompiledCode.st Sat Apr 09 18:19:04 2011 +0100 @@ -1848,14 +1848,15 @@ !CompiledCode class methodsFor:'documentation'! version - ^ '$Id: CompiledCode.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CompiledCode.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.108 2009/10/06 14:59:40 fm Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/CompiledCode.st,v 1.108 2009-10-06 14:59:40 fm Exp ' ! version_SVN - ^ '$Id: CompiledCode.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: CompiledCode.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Context.st --- a/Context.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Context.st Sat Apr 09 18:19:04 2011 +0100 @@ -2408,15 +2408,16 @@ !Context class methodsFor:'documentation'! version - ^ '$Id: Context.st 10623 2011-03-17 15:08:28Z vranyj1 $' + ^ '$Id: Context.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Context.st,v 1.158 2010/08/14 10:56:21 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Context.st,v 1.158 2010-08-14 10:56:21 cg Exp ' ! version_SVN - ^ '$Id: Context.st 10623 2011-03-17 15:08:28Z vranyj1 $' + ^ '$Id: Context.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Context initialize! + diff -r 1602a49e146e -r 04ff72c5039a Date.st --- a/Date.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Date.st Sat Apr 09 18:19:04 2011 +0100 @@ -3051,15 +3051,15 @@ !Date class methodsFor:'documentation'! version - ^ '$Id: Date.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Date.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Date.st,v 1.138 2011/01/24 19:56:01 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Date.st,v 1.138 2011-01-24 19:56:01 stefan Exp ' ! version_SVN - ^ '$Id: Date.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Date.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Date initialize! @@ -3069,3 +3069,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Delay.st --- a/Delay.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Delay.st Sat Apr 09 18:19:04 2011 +0100 @@ -344,17 +344,18 @@ !Delay class methodsFor:'documentation'! version - ^ '$Id: Delay.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Delay.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: Delay.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Delay.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Delay.st,v 1.44 2010/12/22 13:18:18 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Delay.st,v 1.44 2010-12-22 13:18:18 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Dictionary.st --- a/Dictionary.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Dictionary.st Sat Apr 09 18:19:04 2011 +0100 @@ -531,7 +531,8 @@ keyArray do:[:key | (key notNil and:[key ~~ DeletedEntry]) ifTrue:[ key == NilKey ifTrue:[ - keySet add:nil + "No, Set does not accept nil as an element!!" +"/ keySet add:nil ] ifFalse:[ keySet add:key ] @@ -2057,15 +2058,15 @@ !Dictionary class methodsFor:'documentation'! version - ^ '$Id: Dictionary.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Dictionary.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.102 2010/08/24 08:28:27 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Dictionary.st,v 1.103 2011-04-08 11:56:21 stefan Exp ' ! version_SVN - ^ '$Id: Dictionary.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Dictionary.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Dictionary initialize! @@ -2075,3 +2076,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a DirectoryStream.st --- a/DirectoryStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/DirectoryStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -795,15 +795,15 @@ !DirectoryStream class methodsFor:'documentation'! version - ^ '$Id: DirectoryStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: DirectoryStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.74 2010/04/30 16:48:14 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/DirectoryStream.st,v 1.74 2010-04-30 16:48:14 stefan Exp ' ! version_SVN - ^ '$Id: DirectoryStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: DirectoryStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -811,3 +811,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a EncodedStream.st --- a/EncodedStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/EncodedStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -258,18 +258,19 @@ !EncodedStream class methodsFor:'documentation'! version - ^ '$Id: EncodedStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: EncodedStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/EncodedStream.st,v 1.18 2010/02/04 16:11:51 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/EncodedStream.st,v 1.18 2010-02-04 16:11:51 stefan Exp ' ! version_SVN - ^ '$Id: EncodedStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: EncodedStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Error.st --- a/Error.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Error.st Sat Apr 09 18:19:04 2011 +0100 @@ -85,15 +85,15 @@ !Error class methodsFor:'documentation'! version - ^ '$Id: Error.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Error.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Error.st,v 1.11 2010/11/17 16:53:31 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Error.st,v 1.11 2010-11-17 16:53:31 cg Exp ' ! version_SVN - ^ '$Id: Error.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Error.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Error initialize! @@ -102,3 +102,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExecutableFunction.st --- a/ExecutableFunction.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExecutableFunction.st Sat Apr 09 18:19:04 2011 +0100 @@ -413,15 +413,15 @@ !ExecutableFunction class methodsFor:'documentation'! version - ^ '$Id: ExecutableFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExecutableFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: ExecutableFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExecutableFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.56 2010/04/27 10:26:12 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExecutableFunction.st,v 1.56 2010-04-27 10:26:12 cg Exp ' ! ! @@ -429,3 +429,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalAddress.st --- a/ExternalAddress.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalAddress.st Sat Apr 09 18:19:04 2011 +0100 @@ -333,15 +333,15 @@ !ExternalAddress class methodsFor:'documentation'! version - ^ '$Id: ExternalAddress.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ExternalAddress.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalAddress.st,v 1.30 2010/12/24 09:28:27 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalAddress.st,v 1.30 2010-12-24 09:28:27 cg Exp ' ! version_SVN - ^ '$Id: ExternalAddress.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ExternalAddress.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -350,3 +350,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalBytes.st --- a/ExternalBytes.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalBytes.st Sat Apr 09 18:19:04 2011 +0100 @@ -1305,15 +1305,15 @@ !ExternalBytes class methodsFor:'documentation'! version - ^ '$Id: ExternalBytes.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ExternalBytes.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.80 2011/01/05 15:11:14 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalBytes.st,v 1.80 2011-01-05 15:11:14 cg Exp ' ! version_SVN - ^ '$Id: ExternalBytes.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: ExternalBytes.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ExternalBytes initialize! @@ -1324,3 +1324,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalFunction.st --- a/ExternalFunction.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalFunction.st Sat Apr 09 18:19:04 2011 +0100 @@ -972,15 +972,15 @@ !ExternalFunction class methodsFor:'documentation'! version - ^ '$Id: ExternalFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalFunction.st,v 1.27 2009/11/05 16:26:28 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalFunction.st,v 1.27 2009-11-05 16:26:28 stefan Exp ' ! version_SVN - ^ '$Id: ExternalFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ExternalFunction initialize! @@ -989,3 +989,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalFunctionCallback.st --- a/ExternalFunctionCallback.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalFunctionCallback.st Sat Apr 09 18:19:04 2011 +0100 @@ -829,18 +829,19 @@ !ExternalFunctionCallback class methodsFor:'documentation'! version - ^ '$Id: ExternalFunctionCallback.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalFunctionCallback.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalFunctionCallback.st,v 1.15 2009/11/05 16:25:17 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalFunctionCallback.st,v 1.15 2009-11-05 16:25:17 stefan Exp ' ! version_SVN - ^ '$Id: ExternalFunctionCallback.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalFunctionCallback.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ExternalLibrary.st --- a/ExternalLibrary.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalLibrary.st Sat Apr 09 18:19:04 2011 +0100 @@ -43,7 +43,7 @@ !ExternalLibrary class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalLibrary.st,v 1.2 2010/02/01 11:29:17 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalLibrary.st,v 1.2 2010-02-01 11:29:17 cg Exp ' ! version_SVN @@ -54,3 +54,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalLibraryFunction.st --- a/ExternalLibraryFunction.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalLibraryFunction.st Sat Apr 09 18:19:04 2011 +0100 @@ -1492,15 +1492,15 @@ !ExternalLibraryFunction class methodsFor:'documentation'! version - ^ '$Id: ExternalLibraryFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalLibraryFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.79 2010/07/08 14:16:05 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalLibraryFunction.st,v 1.79 2010-07-08 14:16:05 stefan Exp ' ! version_SVN - ^ '$Id: ExternalLibraryFunction.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalLibraryFunction.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ExternalLibraryFunction initialize! @@ -1509,3 +1509,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ExternalStream.st --- a/ExternalStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ExternalStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -1948,9 +1948,10 @@ |elementSize n| elementSize := aContainer class elementByteSize. - n := self nextBytes:nElements*elementSize into:aContainer startingAt:1. + n := self nextBytes:nElements*elementSize into:aContainer startingAt:index. ^ n // elementSize + "Modified: / 15-02-2011 / 11:04:22 / cg" ! readOnly @@ -5691,15 +5692,15 @@ !ExternalStream class methodsFor:'documentation'! version - ^ '$Id: ExternalStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.341 2010/04/12 19:27:17 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ExternalStream.st,v 1.342 2011-02-15 10:04:34 cg Exp ' ! version_SVN - ^ '$Id: ExternalStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ExternalStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ExternalStream initialize! @@ -5709,3 +5710,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a FileDirectory.st --- a/FileDirectory.st Wed Apr 06 13:25:19 2011 +0100 +++ b/FileDirectory.st Sat Apr 09 18:19:04 2011 +0100 @@ -794,17 +794,18 @@ !FileDirectory class methodsFor:'documentation'! version - ^ '$Id: FileDirectory.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FileDirectory.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/FileDirectory.st,v 1.49 2009/10/26 15:24:34 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/FileDirectory.st,v 1.49 2009-10-26 15:24:34 cg Exp ' ! version_SVN - ^ '$Id: FileDirectory.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FileDirectory.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! FileDirectory initialize! + diff -r 1602a49e146e -r 04ff72c5039a FileStream.st --- a/FileStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/FileStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -1710,15 +1710,15 @@ !FileStream class methodsFor:'documentation'! version - ^ '$Id: FileStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FileStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.144 2010/08/31 18:05:23 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/FileStream.st,v 1.144 2010-08-31 18:05:23 stefan Exp ' ! version_SVN - ^ '$Id: FileStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FileStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! FileStream initialize! @@ -1729,3 +1729,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Filename.st --- a/Filename.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Filename.st Sat Apr 09 18:19:04 2011 +0100 @@ -5833,15 +5833,15 @@ !Filename class methodsFor:'documentation'! version - ^ '$Id: Filename.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Filename.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Filename.st,v 1.365 2011/01/25 15:46:32 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Filename.st,v 1.365 2011-01-25 15:46:32 cg Exp ' ! version_SVN - ^ '$Id: Filename.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Filename.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Filename initialize! @@ -5855,3 +5855,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a FixedPoint.st --- a/FixedPoint.st Wed Apr 06 13:25:19 2011 +0100 +++ b/FixedPoint.st Sat Apr 09 18:19:04 2011 +0100 @@ -1349,18 +1349,19 @@ !FixedPoint class methodsFor:'documentation'! version - ^ '$Id: FixedPoint.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FixedPoint.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/FixedPoint.st,v 1.45 2010/11/23 13:39:59 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/FixedPoint.st,v 1.45 2010-11-23 13:39:59 cg Exp ' ! version_SVN - ^ '$Id: FixedPoint.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FixedPoint.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Float.st --- a/Float.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Float.st Sat Apr 09 18:19:04 2011 +0100 @@ -2734,15 +2734,15 @@ !Float class methodsFor:'documentation'! version - ^ '$Id: Float.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Float.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Float.st,v 1.176 2010/11/23 13:35:52 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Float.st,v 1.176 2010-11-23 13:35:52 cg Exp ' ! version_SVN - ^ '$Id: Float.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Float.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Float initialize! @@ -2752,3 +2752,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a FloatArray.st --- a/FloatArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/FloatArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -992,18 +992,19 @@ !FloatArray class methodsFor:'documentation'! version - ^ '$Id: FloatArray.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FloatArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/FloatArray.st,v 1.26 2009/12/01 22:11:19 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/FloatArray.st,v 1.26 2009-12-01 22:11:19 cg Exp ' ! version_SVN - ^ '$Id: FloatArray.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: FloatArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a GenericException.st --- a/GenericException.st Wed Apr 06 13:25:19 2011 +0100 +++ b/GenericException.st Sat Apr 09 18:19:04 2011 +0100 @@ -363,7 +363,7 @@ |parent| NotifierString isNil ifTrue:[ - ^ self name asString + ^ self nameForDescription asString ]. (NotifierString startsWith:Character space) ifTrue:[ (parent := self parent) notNil ifTrue:[ @@ -376,7 +376,17 @@ Object errorSignal description " - "Created: / 23.7.1999 / 14:22:25 / stefan" + "Created: / 23-07-1999 / 14:22:25 / stefan" + "Modified: / 10-02-2011 / 12:29:07 / cg" +! + +nameForDescription + "if no notifierString is specified, this is used. + Can be redfined to hide the namespace in subclasses" + + ^ self name + + "Created: / 10-02-2011 / 12:28:51 / cg" ! ! !GenericException class methodsFor:'queries'! @@ -2286,15 +2296,15 @@ !GenericException class methodsFor:'documentation'! version - ^ '$Id: GenericException.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: GenericException.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.129 2011/01/27 17:32:38 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/GenericException.st,v 1.130 2011-02-10 11:30:47 cg Exp ' ! version_SVN - ^ '$Id: GenericException.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: GenericException.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! GenericException initialize! @@ -2306,3 +2316,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a HashStream.st --- a/HashStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/HashStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -327,18 +327,19 @@ !HashStream class methodsFor:'documentation'! version - ^ '$Id: HashStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: HashStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/HashStream.st,v 1.13 2010/03/04 14:34:21 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/HashStream.st,v 1.13 2010-03-04 14:34:21 cg Exp ' ! version_SVN - ^ '$Id: HashStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: HashStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ImmutableArray.st --- a/ImmutableArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ImmutableArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -223,7 +223,7 @@ ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.28 2009/11/16 08:59:40 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ImmutableArray.st,v 1.28 2009-11-16 08:59:40 stefan Exp ' ! version_SVN @@ -234,3 +234,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ImmutableByteArray.st --- a/ImmutableByteArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ImmutableByteArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -237,7 +237,7 @@ !ImmutableByteArray class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ImmutableByteArray.st,v 1.7 2009/11/16 08:59:40 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ImmutableByteArray.st,v 1.7 2009-11-16 08:59:40 stefan Exp ' ! version_SVN @@ -248,3 +248,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ImmutableString.st --- a/ImmutableString.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ImmutableString.st Sat Apr 09 18:19:04 2011 +0100 @@ -232,7 +232,7 @@ ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ImmutableString.st,v 1.9 2009/11/16 08:59:40 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ImmutableString.st,v 1.9 2009-11-16 08:59:40 stefan Exp ' ! version_SVN @@ -243,3 +243,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Infinity.st --- a/Infinity.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Infinity.st Sat Apr 09 18:19:04 2011 +0100 @@ -425,15 +425,15 @@ !Infinity class methodsFor:'documentation'! version - ^ '$Id: Infinity.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Infinity.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Infinity.st,v 1.13 2009/10/12 19:34:30 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Infinity.st,v 1.13 2009-10-12 19:34:30 cg Exp ' ! version_SVN - ^ '$Id: Infinity.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Infinity.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Infinity initialize! @@ -442,3 +442,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a InlineObjectClassDescription.st --- a/InlineObjectClassDescription.st Wed Apr 06 13:25:19 2011 +0100 +++ b/InlineObjectClassDescription.st Sat Apr 09 18:19:04 2011 +0100 @@ -53,16 +53,17 @@ !InlineObjectClassDescription class methodsFor:'documentation'! version - ^ '$Id: InlineObjectClassDescription.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: InlineObjectClassDescription.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: InlineObjectClassDescription.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: InlineObjectClassDescription.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/InlineObjectClassDescription.st,v 1.2 2010/08/13 16:57:49 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/InlineObjectClassDescription.st,v 1.2 2010-08-13 16:57:49 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Integer.st --- a/Integer.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Integer.st Sat Apr 09 18:19:04 2011 +0100 @@ -4720,15 +4720,15 @@ !Integer class methodsFor:'documentation'! version - ^ '$Id: Integer.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Integer.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Integer.st,v 1.251 2010/08/17 15:32:31 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Integer.st,v 1.251 2010-08-17 15:32:31 cg Exp ' ! version_SVN - ^ '$Id: Integer.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Integer.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Integer initialize! @@ -4740,3 +4740,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Interval.st --- a/Interval.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Interval.st Sat Apr 09 18:19:04 2011 +0100 @@ -692,15 +692,16 @@ !Interval class methodsFor:'documentation'! version - ^ '$Id: Interval.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Interval.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: Interval.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Interval.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Interval.st,v 1.52 2010/09/21 06:57:23 stefan Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Interval.st,v 1.52 2010-09-21 06:57:23 stefan Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a InvalidPatchError.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/InvalidPatchError.st Sat Apr 09 18:19:04 2011 +0100 @@ -0,0 +1,67 @@ +" + COPYRIGHT (c) 2011 by eXept Software AG + All Rights Reserved + + This software is furnished under a license and may be used + only in accordance with the terms of that license and with the + inclusion of the above copyright notice. This software may not + be provided or otherwise made available to, or used by, any + other person. No title to or ownership of the software is + hereby transferred. +" +"{ Package: 'stx:libbasic' }" + +ProceedableError subclass:#InvalidPatchError + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Kernel-Exceptions-Errors' +! + +!InvalidPatchError class methodsFor:'documentation'! + +copyright +" + COPYRIGHT (c) 2011 by eXept Software AG + All Rights Reserved + + This software is furnished under a license and may be used + only in accordance with the terms of that license and with the + inclusion of the above copyright notice. This software may not + be provided or otherwise made available to, or used by, any + other person. No title to or ownership of the software is + hereby transferred. + +" +! + +documentation +" + Patch could not be loaded. + The reason is passed in the message string + + [author:] + Stefan Vogel + + [instance variables:] + + [class variables:] + + [see also:] + +" +! ! + +!InvalidPatchError class methodsFor:'initialization'! + +initialize + NotifierString := 'Cannot load patch'. +! ! + +!InvalidPatchError class methodsFor:'documentation'! + +version_CVS + ^ '§Header: /var/local/cvs/stx/libbasic/InvalidPatchError.st,v 1.1 2011-02-03 11:49:27 stefan Exp §' +! ! + +InvalidPatchError initialize! diff -r 1602a49e146e -r 04ff72c5039a KeyedCollection.st --- a/KeyedCollection.st Wed Apr 06 13:25:19 2011 +0100 +++ b/KeyedCollection.st Sat Apr 09 18:19:04 2011 +0100 @@ -200,15 +200,15 @@ !KeyedCollection class methodsFor:'documentation'! version - ^ '$Id: KeyedCollection.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: KeyedCollection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/KeyedCollection.st,v 1.8 2010/08/24 08:29:08 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/KeyedCollection.st,v 1.8 2010-08-24 08:29:08 cg Exp ' ! version_SVN - ^ '$Id: KeyedCollection.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: KeyedCollection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -216,3 +216,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a LargeInteger.st --- a/LargeInteger.st Wed Apr 06 13:25:19 2011 +0100 +++ b/LargeInteger.st Sat Apr 09 18:19:04 2011 +0100 @@ -5141,15 +5141,15 @@ !LargeInteger class methodsFor:'documentation'! version - ^ '$Id: LargeInteger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LargeInteger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.202 2010/08/10 10:34:11 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/LargeInteger.st,v 1.202 2010-08-10 10:34:11 cg Exp ' ! version_SVN - ^ '$Id: LargeInteger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LargeInteger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -5158,3 +5158,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a LibraryDefinition.st --- a/LibraryDefinition.st Wed Apr 06 13:25:19 2011 +0100 +++ b/LibraryDefinition.st Sat Apr 09 18:19:04 2011 +0100 @@ -676,7 +676,7 @@ ! isProjectDefinition - ^ self ~~ LibraryDefinition + ^ self ~~ LibraryDefinition "/ skip myself - I am abstract " stx_libboss isProjectDefinition @@ -684,21 +684,21 @@ " "Created: / 17-08-2006 / 14:11:46 / cg" - "Modified: / 21-08-2006 / 15:50:13 / cg" + "Modified: / 08-02-2011 / 10:03:42 / cg" ! ! !LibraryDefinition class methodsFor:'documentation'! version - ^ '$Id: LibraryDefinition.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: LibraryDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.99 2010/12/21 10:38:23 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/LibraryDefinition.st,v 1.100 2011-02-08 09:04:09 cg Exp ' ! version_SVN - ^ '$Id: LibraryDefinition.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: LibraryDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -706,3 +706,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a LimitedPrecisionReal.st --- a/LimitedPrecisionReal.st Wed Apr 06 13:25:19 2011 +0100 +++ b/LimitedPrecisionReal.st Sat Apr 09 18:19:04 2011 +0100 @@ -1197,15 +1197,15 @@ !LimitedPrecisionReal class methodsFor:'documentation'! version - ^ '$Id: LimitedPrecisionReal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LimitedPrecisionReal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.72 2010/03/06 11:27:34 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/LimitedPrecisionReal.st,v 1.72 2010-03-06 11:27:34 cg Exp ' ! version_SVN - ^ '$Id: LimitedPrecisionReal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LimitedPrecisionReal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! LimitedPrecisionReal initialize! @@ -1214,3 +1214,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a LinkedList.st --- a/LinkedList.st Wed Apr 06 13:25:19 2011 +0100 +++ b/LinkedList.st Sat Apr 09 18:19:04 2011 +0100 @@ -430,14 +430,15 @@ !LinkedList class methodsFor:'documentation'! version - ^ '$Id: LinkedList.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LinkedList.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: LinkedList.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LinkedList.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/LinkedList.st,v 1.40 2010/12/08 15:06:55 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/LinkedList.st,v 1.40 2010-12-08 15:06:55 stefan Exp ' ! ! + diff -r 1602a49e146e -r 04ff72c5039a LongFloat.st --- a/LongFloat.st Wed Apr 06 13:25:19 2011 +0100 +++ b/LongFloat.st Sat Apr 09 18:19:04 2011 +0100 @@ -2537,15 +2537,15 @@ !LongFloat class methodsFor:'documentation'! version - ^ '$Id: LongFloat.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LongFloat.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.68 2010/09/05 15:48:37 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/LongFloat.st,v 1.68 2010-09-05 15:48:37 cg Exp ' ! version_SVN - ^ '$Id: LongFloat.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: LongFloat.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! LongFloat initialize! @@ -2556,3 +2556,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a MD5Stream.st --- a/MD5Stream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/MD5Stream.st Sat Apr 09 18:19:04 2011 +0100 @@ -455,15 +455,15 @@ !MD5Stream class methodsFor:'documentation'! version - ^ '$Id: MD5Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MD5Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/MD5Stream.st,v 1.14 2010/08/07 17:11:19 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/MD5Stream.st,v 1.14 2010-08-07 17:11:19 cg Exp ' ! version_SVN - ^ '$Id: MD5Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MD5Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! MD5Stream initialize! @@ -473,3 +473,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Make.proto --- a/Make.proto Wed Apr 06 13:25:19 2011 +0100 +++ b/Make.proto Sat Apr 09 18:19:04 2011 +0100 @@ -1,4 +1,4 @@ -# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.234 2011/01/24 20:29:46 stefan Exp $ +# $Header: /var/local/cvs/stx/libbasic/Make.proto,v 1.236 2011-02-09 10:45:55 cg Exp $ # # DO NOT EDIT # automagically generated from the projectDefinition: stx_libbasic. @@ -239,6 +239,7 @@ $(OUTDIR)YesToAllConfirmation.$(O) YesToAllConfirmation.$(H): YesToAllConfirmation.st $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)stx_libbasic.$(O) stx_libbasic.$(H): stx_libbasic.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)AbortAllOperationRequest.$(O) AbortAllOperationRequest.$(H): AbortAllOperationRequest.st $(INCLUDE_TOP)/stx/libbasic/ControlRequest.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) +$(OUTDIR)AbortAllOperationWantedQuery.$(O) AbortAllOperationWantedQuery.$(H): AbortAllOperationWantedQuery.st $(INCLUDE_TOP)/stx/libbasic/Query.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)AbstractSourceFileWriter.$(O) AbstractSourceFileWriter.$(H): AbstractSourceFileWriter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Query.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(STCHDR) $(OUTDIR)ActivityNotification.$(O) ActivityNotification.$(H): ActivityNotification.st $(INCLUDE_TOP)/stx/libbasic/UserNotification.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)Array.$(O) Array.$(H): Array.st $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) @@ -301,6 +302,7 @@ $(OUTDIR)Float.$(O) Float.$(H): Float.st $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)GetOpt.$(O) GetOpt.$(H): GetOpt.st $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)ImmutableArray.$(O) ImmutableArray.$(H): ImmutableArray.st $(INCLUDE_TOP)/stx/libbasic/Array.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) +$(OUTDIR)InvalidPatchError.$(O) InvalidPatchError.$(H): InvalidPatchError.st $(INCLUDE_TOP)/stx/libbasic/ProceedableError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)LargeInteger.$(O) LargeInteger.$(H): LargeInteger.st $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)LongFloat.$(O) LongFloat.$(H): LongFloat.st $(INCLUDE_TOP)/stx/libbasic/LimitedPrecisionReal.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)MessageNotUnderstood.$(O) MessageNotUnderstood.$(H): MessageNotUnderstood.st $(INCLUDE_TOP)/stx/libbasic/ProceedableError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) @@ -393,3 +395,4 @@ # ENDMAKEDEPEND --- do not remove this line + diff -r 1602a49e146e -r 04ff72c5039a Make.spec --- a/Make.spec Wed Apr 06 13:25:19 2011 +0100 +++ b/Make.spec Sat Apr 09 18:19:04 2011 +0100 @@ -1,4 +1,4 @@ -# $Header: /cvs/stx/stx/libbasic/Make.spec,v 1.111 2011/01/24 20:28:30 stefan Exp $ +# $Header: /var/local/cvs/stx/libbasic/Make.spec,v 1.113 2011-02-09 10:45:53 cg Exp $ # # DO NOT EDIT # automagically generated from the projectDefinition: stx_libbasic. @@ -341,6 +341,8 @@ CharacterEncoderImplementations::EBCDIC \ SameForAllNotification \ UtcTimestamp \ + InvalidPatchError \ + AbortAllOperationWantedQuery \ WIN32_CLASSES= \ CharacterEncoderImplementations::MS_Baltic \ @@ -648,6 +650,8 @@ $(OUTDIR)CharacterEncoderImplementations__EBCDIC.$(O) \ $(OUTDIR)SameForAllNotification.$(O) \ $(OUTDIR)UtcTimestamp.$(O) \ + $(OUTDIR)InvalidPatchError.$(O) \ + $(OUTDIR)AbortAllOperationWantedQuery.$(O) \ WIN32_OBJS= \ $(OUTDIR)CharacterEncoderImplementations__MS_Baltic.$(O) \ @@ -662,3 +666,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a MessageNotUnderstood.st --- a/MessageNotUnderstood.st Wed Apr 06 13:25:19 2011 +0100 +++ b/MessageNotUnderstood.st Sat Apr 09 18:19:04 2011 +0100 @@ -169,16 +169,17 @@ !MessageNotUnderstood class methodsFor:'documentation'! version - ^ '$Id: MessageNotUnderstood.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MessageNotUnderstood.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: MessageNotUnderstood.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MessageNotUnderstood.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.11 2010/08/19 13:44:12 cg Exp §' + ^ 'Header: /var/local/cvs/stx/libbasic/MessageNotUnderstood.st,v 1.11 2010-08-19 13:44:12 cg Exp ' ! ! + diff -r 1602a49e146e -r 04ff72c5039a MessageSend.st --- a/MessageSend.st Wed Apr 06 13:25:19 2011 +0100 +++ b/MessageSend.st Sat Apr 09 18:19:04 2011 +0100 @@ -289,16 +289,17 @@ !MessageSend class methodsFor:'documentation'! version - ^ '$Id: MessageSend.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: MessageSend.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: MessageSend.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: MessageSend.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.23 2010/12/22 12:50:41 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/MessageSend.st,v 1.23 2010-12-22 12:50:41 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Metaclass.st --- a/Metaclass.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Metaclass.st Sat Apr 09 18:19:04 2011 +0100 @@ -889,15 +889,15 @@ !Metaclass class methodsFor:'documentation'! version - ^ '$Id: Metaclass.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Metaclass.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.208 2010/04/03 10:46:40 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Metaclass.st,v 1.208 2010-04-03 10:46:40 cg Exp ' ! version_SVN - ^ '$Id: Metaclass.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Metaclass.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Metaclass initialize! @@ -906,3 +906,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Method.st --- a/Method.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Method.st Sat Apr 09 18:19:04 2011 +0100 @@ -3393,18 +3393,19 @@ !Method class methodsFor:'documentation'! version - ^ '$Id: Method.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Method.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Method.st,v 1.355 2010/12/23 15:16:43 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Method.st,v 1.355 2010-12-23 15:16:43 cg Exp §' ! version_SVN - ^ '$Id: Method.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Method.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Method initialize! + diff -r 1602a49e146e -r 04ff72c5039a MiniDebugger.st --- a/MiniDebugger.st Wed Apr 06 13:25:19 2011 +0100 +++ b/MiniDebugger.st Sat Apr 09 18:19:04 2011 +0100 @@ -875,15 +875,16 @@ !MiniDebugger class methodsFor:'documentation'! version - ^ '$Id: MiniDebugger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MiniDebugger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: MiniDebugger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: MiniDebugger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.78 2010/10/29 16:52:00 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/MiniDebugger.st,v 1.78 2010-10-29 16:52:00 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a NameSpace.st --- a/NameSpace.st Wed Apr 06 13:25:19 2011 +0100 +++ b/NameSpace.st Sat Apr 09 18:19:04 2011 +0100 @@ -718,16 +718,17 @@ !NameSpace class methodsFor:'documentation'! version - ^ '$Id: NameSpace.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: NameSpace.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.70 2010/12/20 11:06:03 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/NameSpace.st,v 1.70 2010-12-20 11:06:03 cg Exp ' ! version_SVN - ^ '$Id: NameSpace.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: NameSpace.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a NoHandlerError.st --- a/NoHandlerError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/NoHandlerError.st Sat Apr 09 18:19:04 2011 +0100 @@ -560,15 +560,15 @@ !NoHandlerError class methodsFor:'documentation'! version - ^ '$Id: NoHandlerError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: NoHandlerError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.19 2010/03/13 10:31:25 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/NoHandlerError.st,v 1.19 2010-03-13 10:31:25 cg Exp ' ! version_SVN - ^ '$Id: NoHandlerError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: NoHandlerError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! NoHandlerError initialize! @@ -577,3 +577,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a NoModificationError.st --- a/NoModificationError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/NoModificationError.st Sat Apr 09 18:19:04 2011 +0100 @@ -50,7 +50,7 @@ !NoModificationError class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/NoModificationError.st,v 1.2 2009/11/05 22:42:42 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/NoModificationError.st,v 1.2 2009-11-05 22:42:42 cg Exp ' ! version_SVN @@ -63,3 +63,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a NonPositionableExternalStream.st --- a/NonPositionableExternalStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/NonPositionableExternalStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -560,18 +560,19 @@ !NonPositionableExternalStream class methodsFor:'documentation'! version - ^ '$Id: NonPositionableExternalStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: NonPositionableExternalStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.61 2010/03/04 15:11:43 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/NonPositionableExternalStream.st,v 1.61 2010-03-04 15:11:43 stefan Exp ' ! version_SVN - ^ '$Id: NonPositionableExternalStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: NonPositionableExternalStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Notification.st --- a/Notification.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Notification.st Sat Apr 09 18:19:04 2011 +0100 @@ -338,15 +338,15 @@ !Notification class methodsFor:'documentation'! version - ^ '$Id: Notification.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Notification.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Notification.st,v 1.25 2009/10/14 17:34:24 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Notification.st,v 1.25 2009-10-14 17:34:24 cg Exp ' ! version_SVN - ^ '$Id: Notification.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Notification.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Notification initialize! @@ -355,3 +355,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Number.st --- a/Number.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Number.st Sat Apr 09 18:19:04 2011 +0100 @@ -2251,15 +2251,15 @@ !Number class methodsFor:'documentation'! version - ^ '$Id: Number.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Number.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Number.st,v 1.133 2010/08/02 11:27:38 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Number.st,v 1.133 2010-08-02 11:27:38 cg Exp ' ! version_SVN - ^ '$Id: Number.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Number.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -2267,3 +2267,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a OSErrorHolder.st --- a/OSErrorHolder.st Wed Apr 06 13:25:19 2011 +0100 +++ b/OSErrorHolder.st Sat Apr 09 18:19:04 2011 +0100 @@ -412,15 +412,15 @@ !OSErrorHolder class methodsFor:'documentation'! version - ^ '$Id: OSErrorHolder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: OSErrorHolder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/OSErrorHolder.st,v 1.19 2010/07/22 18:11:49 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/OSErrorHolder.st,v 1.19 2010-07-22 18:11:49 stefan Exp ' ! version_SVN - ^ '$Id: OSErrorHolder.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: OSErrorHolder.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! OSErrorHolder initialize! @@ -430,3 +430,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a OSProcess.st --- a/OSProcess.st Wed Apr 06 13:25:19 2011 +0100 +++ b/OSProcess.st Sat Apr 09 18:19:04 2011 +0100 @@ -81,6 +81,18 @@ pid := something. ! ! +!OSProcess methodsFor:'printing'! + +printOn:aStream + aStream + nextPutAll:self className; + nextPut:$(. + pid printOn:aStream. + aStream space. + commandLine printOn:aStream. + aStream nextPut:$) +! ! + !OSProcess methodsFor:'queries'! getProcessHandle @@ -146,7 +158,7 @@ !OSProcess class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/OSProcess.st,v 1.1 2010/04/27 08:07:00 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/OSProcess.st,v 1.2 2011-03-08 17:01:30 stefan Exp ' ! version_SVN @@ -157,3 +169,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Object.st --- a/Object.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Object.st Sat Apr 09 18:19:04 2011 +0100 @@ -688,6 +688,36 @@ !Object methodsFor:'accessing'! +_at:index + "experimental: + this is a synthetic selector, generated by the compiler, + if a construct of the form expr[idx...] is parsed. + I.e. + v[n] + generates + v _at: n + " + + ^ self at:index + + "Created: / 21-03-2011 / 14:07:57 / cg" +! + +_at:index put:value + "experimental: + this is a synthetic selector, generated by the compiler, + if a construct of the form expr[idx...] is parsed. + I.e. + v[n] + generates + v _at: n + " + + ^ self at:index put:value + + "Created: / 21-03-2011 / 14:10:12 / cg" +! + at:index "return the indexed instance variable with index, anInteger; this method can be redefined in subclasses." @@ -2100,6 +2130,7 @@ %} ! ! + !Object methodsFor:'converting'! -> anObject @@ -9372,15 +9403,15 @@ !Object class methodsFor:'documentation'! version - ^ '$Id: Object.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Object.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Object.st,v 1.663 2011/01/31 12:05:03 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Object.st,v 1.664 2011-03-21 13:16:18 cg Exp ' ! version_SVN - ^ '$Id: Object.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Object.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Object initialize! @@ -9389,3 +9420,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ObjectMemory.st --- a/ObjectMemory.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ObjectMemory.st Sat Apr 09 18:19:04 2011 +0100 @@ -5025,11 +5025,13 @@ by '.chg', or, if not running from an image, the default name 'st.chg'." ChangeFileName notNil ifTrue:[^ ChangeFileName]. - ^ self imageBaseName , '.chg' + ^ self nameForChangesLocal " ObjectMemory nameForChanges " + + "Modified: / 09-02-2011 / 20:44:37 / cg" ! nameForChanges:aFilename @@ -5042,6 +5044,18 @@ " ! +nameForChangesLocal + "return a reasonable filename to store the changes into." + + ^ self imageBaseName , '.chg' + + " + ObjectMemory nameForChanges + " + + "Created: / 09-02-2011 / 20:44:31 / cg" +! + nameForCrashImage ^ 'crash', '.', self suffixForSnapshot @@ -5390,15 +5404,15 @@ !ObjectMemory class methodsFor:'documentation'! version - ^ '$Id: ObjectMemory.st 10620 2011-03-07 20:13:29Z vranyj1 $' + ^ '$Id: ObjectMemory.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.249 2010/05/11 10:31:43 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ObjectMemory.st,v 1.250 2011-02-09 19:44:55 cg Exp ' ! version_SVN - ^ '$Id: ObjectMemory.st 10620 2011-03-07 20:13:29Z vranyj1 $' + ^ '$Id: ObjectMemory.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ObjectMemory initialize! @@ -5408,3 +5422,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a PCFilename.st --- a/PCFilename.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PCFilename.st Sat Apr 09 18:19:04 2011 +0100 @@ -104,9 +104,7 @@ pid := pid copyLast:(3 min:pid size). nr := NextTempFilenameIndex printString. nr := nr copyLast:(3 min:nr size). - nameString := (self tempFileNameTemplate) - bindWith:pid - with:nr. + nameString := (self tempFileNameTemplate) bindWith:pid with:nr. NextTempFilenameIndex := NextTempFilenameIndex + 1. (aDirectoryPrefix isNil or:[aDirectoryPrefix asString isEmpty]) ifFalse:[ @@ -136,11 +134,10 @@ Filename newTemporaryIn:('source' asFilename) " - "Modified: 7.9.1995 / 10:48:31 / claus" - "Modified: 8.9.1997 / 00:28:33 / cg" - "Created: 30.1.1998 / 11:49:33 / md" - "Modified: 30.1.1998 / 11:52:06 / md" - "Modified: 30.1.1998 / 12:09:18 / dq" + "Modified: / 07-09-1995 / 10:48:31 / claus" + "Created: / 30-01-1998 / 11:49:33 / md" + "Modified: / 30-01-1998 / 12:09:18 / dq" + "Modified: / 23-03-2011 / 16:29:34 / cg" ! rootDirectoryOnVolume:aVolumeName @@ -886,11 +883,11 @@ !PCFilename class methodsFor:'documentation'! version - ^ '$Id: PCFilename.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PCFilename.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.52 2010/12/01 17:54:15 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/PCFilename.st,v 1.53 2011-03-23 15:46:46 cg Exp §' ! ! @@ -900,3 +897,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a PackageId.st --- a/PackageId.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PackageId.st Sat Apr 09 18:19:04 2011 +0100 @@ -279,18 +279,19 @@ !PackageId class methodsFor:'documentation'! version - ^ '$Id: PackageId.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PackageId.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/PackageId.st,v 1.16 2009/10/22 15:43:27 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/PackageId.st,v 1.16 2009-10-22 15:43:27 cg Exp ' ! version_SVN - ^ '$Id: PackageId.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PackageId.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a PeekableStream.st --- a/PeekableStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PeekableStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -547,7 +547,7 @@ (in theory) create readers for any syntax. " - |aString sawExcla rslt done| + |aString sawExcla rslt done compiler| self skipSeparators. self atEnd ifFalse:[ @@ -565,13 +565,21 @@ passChunk ifTrue:[ someone notNil ifTrue:[someone source:aString] ]. + compiler := Smalltalk::Compiler new. + compiler allowUndeclaredVariables:false. + sawExcla ifFalse:[ - rslt := Smalltalk::Compiler new evaluate:aString notifying:someone. + "/ class definition chunks, etc., which are simply evaluated + rslt := compiler evaluate:aString notifying:someone. ] ifTrue:[ + "/ methodsFor chunks, etc., which generate a reader Smalltalk::Compiler emptySourceNotificationSignal handle:[:ex | ^ nil ] do:[ - rslt := Smalltalk::Compiler new evaluate:aString notifying:someone compile:false. + rslt := compiler + evaluate:aString + notifying:someone + compile:false. ]. " @@ -579,7 +587,7 @@ in this case, the returned value is a ClassCategoryReader, which is used to load & compile the methods ... " - rslt isNil ifTrue:[ + (rslt isNil or:[rslt == #Error]) ifTrue:[ " however, if that was nil (i.e. some error), we skip chunks up to the next empty chunk. @@ -603,7 +611,7 @@ ]. ^ rslt - "Modified: 14.10.1997 / 17:10:35 / cg" + "Modified: / 05-02-2011 / 10:06:57 / cg" ! fileInNotifying:notifiedLoader passChunk:passChunk @@ -1026,15 +1034,15 @@ !PeekableStream class methodsFor:'documentation'! version - ^ '$Id: PeekableStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PeekableStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.39 2010/03/12 12:39:13 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/PeekableStream.st,v 1.40 2011-02-05 10:40:33 cg Exp ' ! version_SVN - ^ '$Id: PeekableStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PeekableStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! PeekableStream initialize! @@ -1043,3 +1051,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a PipeStream.st --- a/PipeStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PipeStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -796,15 +796,15 @@ !PipeStream class methodsFor:'documentation'! version - ^ '$Id: PipeStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PipeStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.111 2010/02/09 18:01:01 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/PipeStream.st,v 1.111 2010-02-09 18:01:01 stefan Exp ' ! version_SVN - ^ '$Id: PipeStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PipeStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! PipeStream initialize! @@ -813,3 +813,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a PluginSupport.st --- a/PluginSupport.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PluginSupport.st Sat Apr 09 18:19:04 2011 +0100 @@ -188,18 +188,19 @@ !PluginSupport class methodsFor:'documentation'! version - ^ '$Id: PluginSupport.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PluginSupport.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.14 2010/09/14 14:07:59 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/PluginSupport.st,v 1.14 2010-09-14 14:07:59 cg Exp ' ! version_SVN - ^ '$Id: PluginSupport.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: PluginSupport.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ProceedableError.st --- a/ProceedableError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ProceedableError.st Sat Apr 09 18:19:04 2011 +0100 @@ -70,16 +70,17 @@ !ProceedableError class methodsFor:'documentation'! version - ^ '$Id: ProceedableError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProceedableError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: ProceedableError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProceedableError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ProceedableError.st,v 1.6 2010/11/17 16:53:49 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ProceedableError.st,v 1.6 2010-11-17 16:53:49 cg Exp ' ! ! ProceedableError initialize! + diff -r 1602a49e146e -r 04ff72c5039a Process.st --- a/Process.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Process.st Sat Apr 09 18:19:04 2011 +0100 @@ -2054,15 +2054,15 @@ !Process class methodsFor:'documentation'! version - ^ '$Id: Process.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Process.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Process.st,v 1.172 2011/01/13 12:50:05 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Process.st,v 1.172 2011-01-13 12:50:05 cg Exp ' ! version_SVN - ^ '$Id: Process.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Process.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Process initialize! @@ -2073,3 +2073,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ProcessorScheduler.st --- a/ProcessorScheduler.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ProcessorScheduler.st Sat Apr 09 18:19:04 2011 +0100 @@ -3378,15 +3378,15 @@ !ProcessorScheduler class methodsFor:'documentation'! version - ^ '$Id: ProcessorScheduler.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProcessorScheduler.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ProcessorScheduler.st,v 1.257 2010/12/08 15:09:24 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ProcessorScheduler.st,v 1.257 2010-12-08 15:09:24 stefan Exp ' ! version_SVN - ^ '$Id: ProcessorScheduler.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProcessorScheduler.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ProcessorScheduler initialize! @@ -3396,3 +3396,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ProgrammingLanguage.st --- a/ProgrammingLanguage.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ProgrammingLanguage.st Sat Apr 09 18:19:04 2011 +0100 @@ -471,15 +471,16 @@ !ProgrammingLanguage class methodsFor:'documentation'! version - ^ '$Id: ProgrammingLanguage.st 10624 2011-03-19 13:06:11Z vranyj1 $' + ^ '$Id: ProgrammingLanguage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/ProgrammingLanguage.st,v 1.14 2011/01/30 09:06:33 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/ProgrammingLanguage.st,v 1.14 2011-01-30 09:06:33 cg Exp §' ! version_SVN - ^ '$Id: ProgrammingLanguage.st 10624 2011-03-19 13:06:11Z vranyj1 $' + ^ '$Id: ProgrammingLanguage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ProgrammingLanguage initialize! + diff -r 1602a49e146e -r 04ff72c5039a Project.st --- a/Project.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Project.st Sat Apr 09 18:19:04 2011 +0100 @@ -1617,15 +1617,15 @@ !Project class methodsFor:'documentation'! version - ^ '$Id: Project.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Project.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Project.st,v 1.208 2009/10/27 09:00:33 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Project.st,v 1.208 2009-10-27 09:00:33 cg Exp ' ! version_SVN - ^ '$Id: Project.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Project.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Project initialize! @@ -1634,3 +1634,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ProjectDefinition.st --- a/ProjectDefinition.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ProjectDefinition.st Sat Apr 09 18:19:04 2011 +0100 @@ -1057,12 +1057,16 @@ Therefore, its not invoked by #initialize, but instead explicitely, by Smalltalk" - Smalltalk isStandAloneApp ifFalse:[ - self allSubclassesDo:[:eachProjectDefinitionClass | + |isStandAloneApp| + + isStandAloneApp := Smalltalk isStandAloneApp. + + self allSubclassesDo:[:eachProjectDefinitionClass | + isStandAloneApp ifFalse:[ eachProjectDefinitionClass installAutoloadedClasses. - eachProjectDefinitionClass projectIsLoaded:true. ]. - ]. + eachProjectDefinitionClass projectIsLoaded:true. + ]. " self initialize @@ -3137,16 +3141,29 @@ d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' ]. s := String streamContents:[:stream| + |suff| + s := self applicationIconFileName. s notNil ifTrue:[ - 'IDR_MAINFRAME ICON DISCARDABLE "%1.ico"' - expandPlaceholdersWith:(Array with:s) on:stream. + s asFilename suffix isEmptyOrNil ifTrue:[ + suff := '.ico' + ] ifFalse:[ + suff := '' + ]. + 'IDR_MAINFRAME ICON DISCARDABLE "%1%2"' + expandPlaceholdersWith:(Array with:s with:suff) on:stream. stream cr. ]. + s := self splashFileName. s notNil ifTrue:[ - 'IDR_SPLASH BITMAP DISCARDABLE "%1.bmp"' - expandPlaceholdersWith:(Array with:s) on:stream. + s asFilename suffix isEmptyOrNil ifTrue:[ + suff := '.bmp' + ] ifFalse:[ + suff := '' + ]. + 'IDR_SPLASH BITMAP DISCARDABLE "%1%2"' + expandPlaceholdersWith:(Array with:s with:suff) on:stream. stream cr. ]. resourceCount := 2. @@ -3162,7 +3179,7 @@ ^ d "Created: / 09-08-2006 / 11:21:21 / fm" - "Modified: / 14-09-2006 / 18:52:37 / cg" + "Modified: / 22-02-2011 / 11:30:36 / cg" ! package_dot_deps_dot_rake_mappings @@ -6099,24 +6116,25 @@ isProjectDefinition "concrete i.e. not abstract" - ^ self ~~ ProjectDefinition + ^ self ~~ ProjectDefinition "/ skip myself - I am abstract "Created: / 10-08-2006 / 16:24:02 / cg" - "Modified: / 23-08-2006 / 14:24:38 / cg" + "Modified: / 08-02-2011 / 10:03:49 / cg" ! ! !ProjectDefinition class methodsFor:'documentation'! version - ^ '$Id: ProjectDefinition.st 10630 2011-04-06 12:25:19Z vranyj1 $' + ^ '$Id: ProjectDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.332 2011/01/28 15:39:06 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ProjectDefinition.st,v 1.335 2011-03-07 10:10:20 stefan Exp ' ! version_SVN - ^ '$Id: ProjectDefinition.st 10630 2011-04-06 12:25:19Z vranyj1 $' + ^ '$Id: ProjectDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! ProjectDefinition initialize! + diff -r 1602a49e146e -r 04ff72c5039a ProtoObject.st --- a/ProtoObject.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ProtoObject.st Sat Apr 09 18:19:04 2011 +0100 @@ -183,18 +183,19 @@ !ProtoObject class methodsFor:'documentation'! version - ^ '$Id: ProtoObject.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProtoObject.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ProtoObject.st,v 1.13 2009/12/01 19:59:38 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ProtoObject.st,v 1.13 2009-12-01 19:59:38 cg Exp ' ! version_SVN - ^ '$Id: ProtoObject.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ProtoObject.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a PrototypeLookupAlgorithm.st --- a/PrototypeLookupAlgorithm.st Wed Apr 06 13:25:19 2011 +0100 +++ b/PrototypeLookupAlgorithm.st Sat Apr 09 18:19:04 2011 +0100 @@ -105,7 +105,7 @@ !PrototypeLookupAlgorithm class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/PrototypeLookupAlgorithm.st,v 1.3 2010/04/07 16:39:47 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/PrototypeLookupAlgorithm.st,v 1.3 2010-04-07 16:39:47 cg Exp ' ! version_SVN @@ -116,3 +116,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Query.st --- a/Query.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Query.st Sat Apr 09 18:19:04 2011 +0100 @@ -272,15 +272,15 @@ !Query class methodsFor:'documentation'! version - ^ '$Id: Query.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Query.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Query.st,v 1.13 2009/10/01 13:44:05 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Query.st,v 1.13 2009-10-01 13:44:05 cg Exp ' ! version_SVN - ^ '$Id: Query.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Query.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Query initialize! @@ -289,3 +289,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a QuerySignal.st --- a/QuerySignal.st Wed Apr 06 13:25:19 2011 +0100 +++ b/QuerySignal.st Sat Apr 09 18:19:04 2011 +0100 @@ -504,18 +504,19 @@ !QuerySignal class methodsFor:'documentation'! version - ^ '$Id: QuerySignal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: QuerySignal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/QuerySignal.st,v 1.44 2009/10/01 07:27:33 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/QuerySignal.st,v 1.44 2009-10-01 07:27:33 cg Exp ' ! version_SVN - ^ '$Id: QuerySignal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: QuerySignal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ReadEvalPrintLoop.st --- a/ReadEvalPrintLoop.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ReadEvalPrintLoop.st Sat Apr 09 18:19:04 2011 +0100 @@ -336,6 +336,7 @@ ]. chunk notEmptyOrNil ifTrue:[ + "abortAll is handled, but not asked for here!!" AbortAllOperationRequest handle:[:ex | error nextPutLine:('Evaluation aborted: ', ex description) ] do:[ @@ -366,21 +367,22 @@ " "Created: / 07-12-2006 / 17:27:21 / cg" - "Modified: / 07-12-2006 / 19:41:20 / cg" + "Modified: / 09-02-2011 / 14:00:49 / cg" ! ! !ReadEvalPrintLoop class methodsFor:'documentation'! version - ^ '$Id: ReadEvalPrintLoop.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ReadEvalPrintLoop.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: ReadEvalPrintLoop.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ReadEvalPrintLoop.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.27 2010/11/02 12:30:08 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/ReadEvalPrintLoop.st,v 1.28 2011-02-09 13:03:41 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a ReadStream.st --- a/ReadStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ReadStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -828,18 +828,19 @@ !ReadStream class methodsFor:'documentation'! version - ^ '$Id: ReadStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ReadStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.64 2009/11/05 16:25:23 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ReadStream.st,v 1.64 2009-11-05 16:25:23 stefan Exp ' ! version_SVN - ^ '$Id: ReadStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ReadStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Rectangle.st --- a/Rectangle.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Rectangle.st Sat Apr 09 18:19:04 2011 +0100 @@ -1817,17 +1817,18 @@ !Rectangle class methodsFor:'documentation'! version - ^ '$Id: Rectangle.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Rectangle.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: Rectangle.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Rectangle.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.84 2010/07/16 14:59:40 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Rectangle.st,v 1.84 2010-07-16 14:59:40 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a RecursionLock.st --- a/RecursionLock.st Wed Apr 06 13:25:19 2011 +0100 +++ b/RecursionLock.st Sat Apr 09 18:19:04 2011 +0100 @@ -310,18 +310,19 @@ !RecursionLock class methodsFor:'documentation'! version - ^ '$Id: RecursionLock.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: RecursionLock.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/RecursionLock.st,v 1.35 2010/02/04 09:03:44 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/RecursionLock.st,v 1.35 2010-02-04 09:03:44 stefan Exp ' ! version_SVN - ^ '$Id: RecursionLock.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: RecursionLock.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Registry.st --- a/Registry.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Registry.st Sat Apr 09 18:19:04 2011 +0100 @@ -514,16 +514,17 @@ !Registry class methodsFor:'documentation'! version - ^ '$Id: Registry.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Registry.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: Registry.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Registry.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Registry.st,v 1.61 2010/08/11 10:06:08 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Registry.st,v 1.61 2010-08-11 10:06:08 stefan Exp ' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SHA1Stream.st --- a/SHA1Stream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SHA1Stream.st Sat Apr 09 18:19:04 2011 +0100 @@ -682,15 +682,15 @@ !SHA1Stream class methodsFor:'documentation'! version - ^ '$Id: SHA1Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SHA1Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.19 2010/04/13 14:36:36 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SHA1Stream.st,v 1.19 2010-04-13 14:36:36 cg Exp ' ! version_SVN - ^ '$Id: SHA1Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SHA1Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! SHA1Stream initialize! @@ -700,3 +700,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a SameForAllNotification.st --- a/SameForAllNotification.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SameForAllNotification.st Sat Apr 09 18:19:04 2011 +0100 @@ -45,6 +45,7 @@ !SameForAllNotification class methodsFor:'documentation'! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/SameForAllNotification.st,v 1.1 2010/10/14 08:38:23 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/SameForAllNotification.st,v 1.1 2010-10-14 08:38:23 cg Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Semaphore.st --- a/Semaphore.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Semaphore.st Sat Apr 09 18:19:04 2011 +0100 @@ -923,18 +923,19 @@ !Semaphore class methodsFor:'documentation'! version - ^ '$Id: Semaphore.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Semaphore.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Semaphore.st,v 1.84 2010/11/30 13:13:46 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Semaphore.st,v 1.84 2010-11-30 13:13:46 stefan Exp ' ! version_SVN - ^ '$Id: Semaphore.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Semaphore.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SemaphoreSet.st --- a/SemaphoreSet.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SemaphoreSet.st Sat Apr 09 18:19:04 2011 +0100 @@ -306,18 +306,19 @@ !SemaphoreSet class methodsFor:'documentation'! version - ^ '$Id: SemaphoreSet.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SemaphoreSet.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SemaphoreSet.st,v 1.19 2010/02/05 12:58:13 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SemaphoreSet.st,v 1.19 2010-02-05 12:58:13 cg Exp ' ! version_SVN - ^ '$Id: SemaphoreSet.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SemaphoreSet.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SequenceableCollection.st --- a/SequenceableCollection.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SequenceableCollection.st Sat Apr 09 18:19:04 2011 +0100 @@ -7876,15 +7876,15 @@ !SequenceableCollection class methodsFor:'documentation'! version - ^ '$Id: SequenceableCollection.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SequenceableCollection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.301 2011/01/29 09:15:02 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SequenceableCollection.st,v 1.301 2011-01-29 09:15:02 cg Exp ' ! version_SVN - ^ '$Id: SequenceableCollection.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SequenceableCollection.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! SequenceableCollection initialize! @@ -7897,3 +7897,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Set.st --- a/Set.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Set.st Sat Apr 09 18:19:04 2011 +0100 @@ -704,7 +704,7 @@ [true] whileTrue:[ probe := (keyArray basicAt:index). - (probe notNil and:[key = probe]) ifTrue:[^ index]. + (probe notNil and:[probe ~~ DeletedEntry and:[key = probe]]) ifTrue:[^ index]. (self slotIsEmpty:probe) ifTrue:[^ aBlock value]. index == length ifTrue:[ @@ -714,6 +714,8 @@ ]. index == startIndex ifTrue:[^ aBlock value]. ] + + "Modified: / 03-02-2011 / 13:53:18 / sr" ! findKeyOrNil:key @@ -731,7 +733,7 @@ [true] whileTrue:[ probe := keyArray basicAt:index. - (probe notNil and:[key = probe]) ifTrue:[^ index]. + (probe notNil and:[probe ~~ DeletedEntry and:[key = probe]]) ifTrue:[^ index]. (self slotIsEmpty:probe) ifTrue:[ delIndex isNil ifTrue:[^ index]. keyArray basicAt:delIndex put:nil. @@ -758,7 +760,7 @@ ]. ] - "Modified: / 30.10.1997 / 16:01:57 / cg" + "Modified: / 27-02-2011 / 15:30:42 / cg" ! findNil:key @@ -1174,15 +1176,15 @@ !Set class methodsFor:'documentation'! version - ^ '$Id: Set.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Set.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Set.st,v 1.106 2010/07/23 19:40:09 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Set.st,v 1.108 2011-02-28 12:27:23 cg Exp ' ! version_SVN - ^ '$Id: Set.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Set.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Set initialize! @@ -1192,3 +1194,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a SharedPool.st --- a/SharedPool.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SharedPool.st Sat Apr 09 18:19:04 2011 +0100 @@ -190,15 +190,15 @@ !SharedPool class methodsFor:'documentation'! version - ^ '$Id: SharedPool.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SharedPool.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SharedPool.st,v 1.15 2011/01/15 13:21:03 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SharedPool.st,v 1.15 2011-01-15 13:21:03 cg Exp ' ! version_SVN - ^ '$Id: SharedPool.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SharedPool.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -207,3 +207,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a ShortFloat.st --- a/ShortFloat.st Wed Apr 06 13:25:19 2011 +0100 +++ b/ShortFloat.st Sat Apr 09 18:19:04 2011 +0100 @@ -1724,15 +1724,15 @@ !ShortFloat class methodsFor:'documentation'! version - ^ '$Id: ShortFloat.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ShortFloat.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.104 2010/05/05 13:56:55 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/ShortFloat.st,v 1.104 2010-05-05 13:56:55 stefan Exp ' ! version_SVN - ^ '$Id: ShortFloat.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: ShortFloat.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -1740,3 +1740,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Signal.st --- a/Signal.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Signal.st Sat Apr 09 18:19:04 2011 +0100 @@ -964,15 +964,15 @@ !Signal class methodsFor:'documentation'! version - ^ '$Id: Signal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Signal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Signal.st,v 1.109 2010/08/10 08:35:38 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Signal.st,v 1.109 2010-08-10 08:35:38 cg Exp ' ! version_SVN - ^ '$Id: Signal.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Signal.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -980,3 +980,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a SignalSet.st --- a/SignalSet.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SignalSet.st Sat Apr 09 18:19:04 2011 +0100 @@ -332,18 +332,19 @@ !SignalSet class methodsFor:'documentation'! version - ^ '$Id: SignalSet.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SignalSet.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SignalSet.st,v 1.45 2009/10/01 07:38:40 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SignalSet.st,v 1.45 2009-10-01 07:38:40 cg Exp ' ! version_SVN - ^ '$Id: SignalSet.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SignalSet.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SmallInteger.st --- a/SmallInteger.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SmallInteger.st Sat Apr 09 18:19:04 2011 +0100 @@ -3922,15 +3922,15 @@ !SmallInteger class methodsFor:'documentation'! version - ^ '$Id: SmallInteger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmallInteger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.187 2010/08/09 17:52:27 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SmallInteger.st,v 1.187 2010-08-09 17:52:27 cg Exp ' ! version_SVN - ^ '$Id: SmallInteger.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmallInteger.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -3940,3 +3940,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Smalltalk.st --- a/Smalltalk.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Smalltalk.st Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ " COPYRIGHT (c) 1988 by Claus Gittinger - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -37,7 +37,7 @@ copyright " COPYRIGHT (c) 1988 by Claus Gittinger - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -67,150 +67,150 @@ [Instance variables:] - none - all handling is done in the VM + none - all handling is done in the VM [Class variables:] - StartBlocks blocks to be executed in a separate process after - everything has been initialized. These blocks will - be deleted after execution and therefore not be - executed after an image restart. Initial processes - (such as the Launcher) are usually started here. - These blocks are added by smalltalk.rc/private.rc etc. - via #addStartBlock during early initialization. - - ImageStartBlocks - blocks to be executed in a separate process after - everything has been initialized. These blocks will be - executed after an image restart. - These blocks are usually added by smalltalk_r.rc etc. - - ExitBlocks blocks to evaluate before system is - left. Not currently used (GNU-ST compatibility). - - SystemPath path to search for system files (sources, bitmaps etc) - Set to a default here, but typically changed from some - startup.rc file - - PackagePath path to search for package. - This is going to replace the above systemPath, and a classes - resources will eventually searched in its package directory. - This list defines the path, where packages are searched for, - initially this is something like /opt/smalltalk/packages. - Set to a default here, but typically changed from some - startup.rc file - - StartupClass class and selector, where the system starts up - StartupSelector (right after VM initialization) - StartupArguments If an image is saved while those being nonNil, - the image will come up there. - Allows for customized images to be generated from a standard ST/X. - StandAlone programs also set those during initialization. - - CommandLine Unix (OS-) command line - - CommandName the command (i.e. argv[0]) - - CommandLineArguments Unix (OS-) command line arguments broken into words - CommandName has been stripped off. - (initially set by the VM) - - SilentLoading suppresses messages during fileIn and in compiler - (can be set to true from a customized main.c) - - Initializing true while (re-)initializing - Controls the behavior of certain error - reporters (for example: suppress dialogBoxes) - while the system is not yet fit for full operation. - - StandAlone true, if this is a standalone app; - if true the process scheduler watches for - which processes are still running, and - exits ST/X, when the last non-background - and non-system process exits. - Can be set in an application-specific startup script, - or, for standAlone programs, by C-code during initialization. - - HeadlessOperation if true, a non-existing Display connection - will NOT lead to an error-exit during startup. - Default is false. - Can be set in an application-specific startup script, - or, for standAlone programs, by C-code during initialization. - - LogDoits if true, doits are also logged in the changes - file. Default is false, since the changes file - may become huge if every tiny doIt is saved there ... - - LoadBinaries if true, we attempt to load classes rom a binary - file, if present. If false, this is always suppressed. - - SaveEmergencyImage if true (the default), an emergency image - is saved, if the main Display looses its - connection. This is useful if you have a - flaky display connection (serial line) - and want to have your stuff saved automatically - in case of a broken connection. + StartBlocks blocks to be executed in a separate process after + everything has been initialized. These blocks will + be deleted after execution and therefore not be + executed after an image restart. Initial processes + (such as the Launcher) are usually started here. + These blocks are added by smalltalk.rc/private.rc etc. + via #addStartBlock during early initialization. + + ImageStartBlocks + blocks to be executed in a separate process after + everything has been initialized. These blocks will be + executed after an image restart. + These blocks are usually added by smalltalk_r.rc etc. + + ExitBlocks blocks to evaluate before system is + left. Not currently used (GNU-ST compatibility). + + SystemPath path to search for system files (sources, bitmaps etc) + Set to a default here, but typically changed from some + startup.rc file + + PackagePath path to search for package. + This is going to replace the above systemPath, and a classes + resources will eventually searched in its package directory. + This list defines the path, where packages are searched for, + initially this is something like /opt/smalltalk/packages. + Set to a default here, but typically changed from some + startup.rc file + + StartupClass class and selector, where the system starts up + StartupSelector (right after VM initialization) + StartupArguments If an image is saved while those being nonNil, + the image will come up there. + Allows for customized images to be generated from a standard ST/X. + StandAlone programs also set those during initialization. + + CommandLine Unix (OS-) command line + + CommandName the command (i.e. argv[0]) + + CommandLineArguments Unix (OS-) command line arguments broken into words + CommandName has been stripped off. + (initially set by the VM) + + SilentLoading suppresses messages during fileIn and in compiler + (can be set to true from a customized main.c) + + Initializing true while (re-)initializing + Controls the behavior of certain error + reporters (for example: suppress dialogBoxes) + while the system is not yet fit for full operation. + + StandAlone true, if this is a standalone app; + if true the process scheduler watches for + which processes are still running, and + exits ST/X, when the last non-background + and non-system process exits. + Can be set in an application-specific startup script, + or, for standAlone programs, by C-code during initialization. + + HeadlessOperation if true, a non-existing Display connection + will NOT lead to an error-exit during startup. + Default is false. + Can be set in an application-specific startup script, + or, for standAlone programs, by C-code during initialization. + + LogDoits if true, doits are also logged in the changes + file. Default is false, since the changes file + may become huge if every tiny doIt is saved there ... + + LoadBinaries if true, we attempt to load classes rom a binary + file, if present. If false, this is always suppressed. + + SaveEmergencyImage if true (the default), an emergency image + is saved, if the main Display looses its + connection. This is useful if you have a + flaky display connection (serial line) + and want to have your stuff saved automatically + in case of a broken connection. strictly private classVariables (helpers): - CachedClasses known classes (cached for faster class enumeration) - - CachedAbbreviations - className to filename mappings - - RealSystemPath cached collection of directories along the path - which really exist. Caching avoids long checks - for existing directories on broken NFS volumes. - - SourcePath cached names of really existing directories - These are remembered, as in NFS systems, - ResourcePath the time to lookup files may become long - BinaryPath (especially, if some directories are on machines - FileInPath which are not up ...). - Therefore, the set of really - existing directories is cached when the SystemPath - is walked the first time. - A consequence is that you have to invoke - flushSystemPath, when you create any of those - directories while running - (and want the running ST/X to look there) + CachedClasses known classes (cached for faster class enumeration) + + CachedAbbreviations + className to filename mappings + + RealSystemPath cached collection of directories along the path + which really exist. Caching avoids long checks + for existing directories on broken NFS volumes. + + SourcePath cached names of really existing directories + These are remembered, as in NFS systems, + ResourcePath the time to lookup files may become long + BinaryPath (especially, if some directories are on machines + FileInPath which are not up ...). + Therefore, the set of really + existing directories is cached when the SystemPath + is walked the first time. + A consequence is that you have to invoke + flushSystemPath, when you create any of those + directories while running + (and want the running ST/X to look there) [author:] - Claus Gittinger + Claus Gittinger [see also:] - ObjectMemory - StandaloneStartup - GetOpt - ReadEvalPrintLoop + ObjectMemory + StandaloneStartup + GetOpt + ReadEvalPrintLoop " ! readme_resources " What is a resource file: - resource files contain language transformation and sometimes - UI-look specifics such as icons etc. + resource files contain language transformation and sometimes + UI-look specifics such as icons etc. Where are resources stored in the image: - Resource files are only read on demand (i.e. when needed) and only read once - i.e. they are cached in the image). - The cached data is held in a per-class class-instVar named 'ClassResources'. - With only a few exceptions, the only classes which need resources are the GUI - classes under the SimpleView hierarchy. + Resource files are only read on demand (i.e. when needed) and only read once + i.e. they are cached in the image). + The cached data is held in a per-class class-instVar named 'ClassResources'. + With only a few exceptions, the only classes which need resources are the GUI + classes under the SimpleView hierarchy. How does the system find resources: - The idea is that the system-provided resource files can be overwritten - by the user or an application configuration. - This works via a hierarchy of directories where resources are searched for, - with the systems standard resource-files being at the end of that chain. - - When searching for a resource file for class X, the following files are searched - in order: - {ResourcePath} / resources / X.rs - {SystemPath} / (CLASSES-PACKAGE-PATH) / X.rs - {ResourcePath} / (CLASSES-PACKAGE-PATH) / X.rs + The idea is that the system-provided resource files can be overwritten + by the user or an application configuration. + This works via a hierarchy of directories where resources are searched for, + with the systems standard resource-files being at the end of that chain. + + When searching for a resource file for class X, the following files are searched + in order: + {ResourcePath} / resources / X.rs + {SystemPath} / (CLASSES-PACKAGE-PATH) / X.rs + {ResourcePath} / (CLASSES-PACKAGE-PATH) / X.rs " ! ! @@ -222,8 +222,8 @@ right after startup, ususally immediately followed by Smalltalk>>start. [with error handling, via the initializeSystem] Notice: - this is not called when an image is restarted; in this - case the show starts in Smalltalk>>restart." + this is not called when an image is restarted; in this + case the show starts in Smalltalk>>restart." "/ "/ start catching SIGSEGV and SIGBUS @@ -255,12 +255,12 @@ Compiler := ByteCodeCompiler. Compiler isNil ifTrue:[ - " - ByteCodeCompiler is not in the system (i.e. has not been linked in) - this allows at least immediate evaluations for runtime systems without compiler - NOTICE: a parser is always needed, otherwise we cannot read resource files etc. - " - Compiler := Parser + " + ByteCodeCompiler is not in the system (i.e. has not been linked in) + this allows at least immediate evaluations for runtime systems without compiler + NOTICE: a parser is always needed, otherwise we cannot read resource files etc. + " + Compiler := Parser ]. "/ @@ -295,20 +295,20 @@ |envString i langString terrString| StandAlone isNil ifTrue:[ - StandAlone := false. + StandAlone := false. ]. HeadlessOperation isNil ifTrue:[ - HeadlessOperation := false. + HeadlessOperation := false. ]. " extract Language and LanguageTerritory from LANG variable. valid are for example: - en_en / en - en_us - en_gb - de_de / de - de_at (for Austria) + en_en / en + en_us + en_gb + de_de / de + de_at (for Austria) " Language := #en. @@ -316,41 +316,41 @@ "Format of LANG is: language[_territory][.codeset][@modifier] - language ISO-639 Language code - territory ISO-3166 Contry code" + language ISO-639 Language code + territory ISO-3166 Contry code" envString := OperatingSystem getLanguage. envString size > 0 ifTrue:[ - i := envString indexOf:$@. - (i ~~ 0) ifTrue:[ - envString := envString copyTo:(i - 1). - LanguageModifier := (envString copyFrom:(i + 1)) asLowercase asSymbol. - ] ifFalse:[ - LanguageModifier := nil. - ]. - i := envString indexOf:$.. - (i ~~ 0) ifTrue:[ - envString := envString copyTo:(i - 1). - LanguageCodeset := (envString copyFrom:(i + 1)) asLowercase asSymbol - ] ifFalse:[ - LanguageCodeset := #'iso8859-1'. - ]. - i := envString indexOf:$_. - (i == 0) ifTrue:[ - langString := envString. - terrString := envString - ] ifFalse:[ - langString := envString copyTo:(i - 1). - terrString := envString copyFrom:(i + 1) - ]. - langString := langString asLowercase. - terrString := terrString asLowercase. - (langString = 'c' or:[terrString = 'c']) ifTrue:[ - ('Smalltalk [info]: ignoring wrong LANG setting (',langString,'_',terrString,') - using english') infoPrintCR. - ] ifFalse:[ - Language := langString asSymbol. - LanguageTerritory := terrString asSymbol - ] + i := envString indexOf:$@. + (i ~~ 0) ifTrue:[ + envString := envString copyTo:(i - 1). + LanguageModifier := (envString copyFrom:(i + 1)) asLowercase asSymbol. + ] ifFalse:[ + LanguageModifier := nil. + ]. + i := envString indexOf:$.. + (i ~~ 0) ifTrue:[ + envString := envString copyTo:(i - 1). + LanguageCodeset := (envString copyFrom:(i + 1)) asLowercase asSymbol + ] ifFalse:[ + LanguageCodeset := #'iso8859-1'. + ]. + i := envString indexOf:$_. + (i == 0) ifTrue:[ + langString := envString. + terrString := envString + ] ifFalse:[ + langString := envString copyTo:(i - 1). + terrString := envString copyFrom:(i + 1) + ]. + langString := langString asLowercase. + terrString := terrString asLowercase. + (langString = 'c' or:[terrString = 'c']) ifTrue:[ + ('Smalltalk [info]: ignoring wrong LANG setting (',langString,'_',terrString,') - using english') infoPrintCR. + ] ifFalse:[ + Language := langString asSymbol. + LanguageTerritory := terrString asSymbol + ] ]. " @@ -385,7 +385,7 @@ Stderr := NonPositionableExternalStream forStderr. Stdin := NonPositionableExternalStream forStdin. PrinterStream notNil ifTrue:[ - Printer := PrinterStream defaultPrinter. + Printer := PrinterStream defaultPrinter. ]. Transcript := Stderr @@ -402,83 +402,91 @@ they will redefine Inspector and Debugger for graphical interfaces" Display notNil ifTrue:[ - InspectorView notNil ifTrue:[ - Inspector := InspectorView - ]. - DebugView notNil ifTrue:[ - Debugger := DebugView - ]. - "/ Display initialize - ] + InspectorView notNil ifTrue:[ + Inspector := InspectorView + ]. + DebugView notNil ifTrue:[ + Debugger := DebugView + ]. + "/ Display initialize + ]. + + "/ make the changeFilePath an absolute one, + "/ in case some stupid windows fileDialog changes the current directory... + ObjectMemory + nameForChanges:(Filename currentDirectory construct:ObjectMemory nameForChangesLocal) + asAbsoluteFilename pathName " Smalltalk initStandardTools " + + "Modified: / 09-02-2011 / 20:44:47 / cg" ! initSystemPath "setup path where system files are searched for. the default path is set to: - . - (WIN32 only) - $HOME (if defined) - $HOME/.smalltalk (if defined & existing) - $SMALLTALK_LIBDIR (if defined & existing) - $STX_LIBDIR (if defined & existing) - $STX_TOPDIR (if defined & existing) - REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\\LibDir') (WIN32 only) - REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\LibDir') (WIN32 only) - + . + (WIN32 only) + $HOME (if defined) + $HOME/.smalltalk (if defined & existing) + $SMALLTALK_LIBDIR (if defined & existing) + $STX_LIBDIR (if defined & existing) + $STX_TOPDIR (if defined & existing) + REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\\LibDir') (WIN32 only) + REGISTRY('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\LibDir') (WIN32 only) + standard places (unix): - /opt/smalltalk/ (if existing) - /opt/smalltalk (if existing) - /usr/local/lib/smalltalk (if existing) - /usr/lib/smalltalk (if existing) - /lib/smalltalk (if existing) + /opt/smalltalk/ (if existing) + /opt/smalltalk (if existing) + /usr/local/lib/smalltalk (if existing) + /usr/lib/smalltalk (if existing) + /lib/smalltalk (if existing) win32: - \programs\exept\smalltalk (if existing) - \programs\smalltalk (if existing) - \smalltalk (if existing) + \programs\exept\smalltalk (if existing) + \programs\smalltalk (if existing) + \smalltalk (if existing) vms: - $stx:lib (if existing) - $stx:root (if existing) + $stx:lib (if existing) + $stx:root (if existing) of course, it is possible to add entries from the 'smalltalk.rc' startup file; add expressions such as: - Smalltalk systemPath addFirst:'/foo/bar/baz'. - or: - Smalltalk systemPath addLast:'/fee/foe/foo'. + Smalltalk systemPath addFirst:'/foo/bar/baz'. + or: + Smalltalk systemPath addLast:'/fee/foe/foo'. However, smalltalk.rc itself must be found along the above path. " ChangeFileName := 'changes'. OperatingSystem isVMSlike ifTrue:[ - BitmapDirName := 'bitmaps.dir'. - BinaryDirName := 'binary.dir'. - SourceDirName := 'source.dir'. - ResourceDirName := 'resources.dir'. - FileInDirName := 'filein.dir'. - PackageDirName := 'packages.dir'. + BitmapDirName := 'bitmaps.dir'. + BinaryDirName := 'binary.dir'. + SourceDirName := 'source.dir'. + ResourceDirName := 'resources.dir'. + FileInDirName := 'filein.dir'. + PackageDirName := 'packages.dir'. ] ifFalse:[ - BitmapDirName := 'bitmaps'. - BinaryDirName := 'binary'. - SourceDirName := 'source'. - ResourceDirName := 'resources'. - FileInDirName := 'fileIn'. - PackageDirName := 'packages'. + BitmapDirName := 'bitmaps'. + BinaryDirName := 'binary'. + SourceDirName := 'source'. + ResourceDirName := 'resources'. + FileInDirName := 'fileIn'. + PackageDirName := 'packages'. ]. SystemPath isNil ifTrue:[ - SystemPath := OperatingSystem defaultSystemPath. - self flushPathCaches + SystemPath := OperatingSystem defaultSystemPath. + self flushPathCaches ]. PackagePath isNil ifTrue:[ - PackagePath := OperatingSystem defaultPackagePath. + PackagePath := OperatingSystem defaultPackagePath. ]. " @@ -506,17 +514,17 @@ "sent from VM via #initializeModules" Error handle:[:ex | - ClassesFailedToInitialize isNil ifTrue:[ - ClassesFailedToInitialize := IdentitySet new. - ]. - ClassesFailedToInitialize add:aClass. - ('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR. - ex suspendedContext fullPrintAll. - (Smalltalk commandLineArguments includes:'--debug') ifTrue:[ - ex reject - ]. + ClassesFailedToInitialize isNil ifTrue:[ + ClassesFailedToInitialize := IdentitySet new. + ]. + ClassesFailedToInitialize add:aClass. + ('Smalltalk [warning]: error during initialize of ' , aClass name,': ', ex description printString) errorPrintCR. + ex suspendedContext fullPrintAll. + (Smalltalk commandLineArguments includes:'--debug') ifTrue:[ + ex reject + ]. ] do:[ - aClass initialize + aClass initialize ]. "Modified: / 23-10-2006 / 16:29:19 / cg" @@ -529,12 +537,12 @@ self initializeModulesOnce. ClassesFailedToInitialize size > 0 ifTrue:[ - ('Smalltalk [info]: retry initialization of failed class(es)...') infoPrintCR. - ClassesFailedToInitialize := nil. - self initializeModulesOnce. - ClassesFailedToInitialize size > 0 ifTrue:[ - ('Smalltalk [error]: class(es) persist to fail during initialize') errorPrintCR. - ] + ('Smalltalk [info]: retry initialization of failed class(es)...') infoPrintCR. + ClassesFailedToInitialize := nil. + self initializeModulesOnce. + ClassesFailedToInitialize size > 0 ifTrue:[ + ('Smalltalk [error]: class(es) persist to fail during initialize') errorPrintCR. + ] ]. ProjectDefinition initializeAllProjectDefinitions. @@ -561,8 +569,8 @@ This one is the very first entry into the smalltalk world, right after startup, ususally immediately followed by Smalltalk>>start. Notice: - this is not called when an image is restarted; in this - case the show starts in Smalltalk>>restart." + this is not called when an image is restarted; in this + case the show starts in Smalltalk>>restart." |idx| @@ -573,7 +581,7 @@ AbstractOperatingSystem initializeConcreteClass. CommandLineArguments isNil ifTrue:[ - CommandLineArguments := #('stx'). + CommandLineArguments := #('stx'). ]. CommandLine := CommandLineArguments copy. CommandLineArguments := CommandLineArguments asOrderedCollection. @@ -585,39 +593,39 @@ DebuggingStandAlone := false. StandAlone ifTrue:[ - InfoPrinting := false. - ObjectMemory infoPrinting:false. - - idx := CommandLineArguments indexOf:'--debug'. - idx ~~ 0 ifTrue:[ - DebuggingStandAlone := true. - ]. - DebuggingStandAlone ifTrue:[ - Inspector := MiniInspector. - Debugger := MiniDebugger. - ]. + InfoPrinting := false. + ObjectMemory infoPrinting:false. + + idx := CommandLineArguments indexOf:'--debug'. + idx ~~ 0 ifTrue:[ + DebuggingStandAlone := true. + ]. + DebuggingStandAlone ifTrue:[ + Inspector := MiniInspector. + Debugger := MiniDebugger. + ]. ] ifFalse:[ - "/ - "/ define low-level debugging tools - graphical classes are not prepared yet - "/ to handle things. - "/ This will bring us into the MiniDebugger when an error occurs during startup. - "/ - Inspector := MiniInspector. - Debugger := MiniDebugger. + "/ + "/ define low-level debugging tools - graphical classes are not prepared yet + "/ to handle things. + "/ This will bring us into the MiniDebugger when an error occurs during startup. + "/ + Inspector := MiniInspector. + Debugger := MiniDebugger. ]. Error handle:[:ex | - StandAlone ifTrue:[ - DebuggingStandAlone ifFalse:[ - 'Startup Error - use --debug command line argument for more info' errorPrintCR. - Smalltalk exit:1. - ]. - 'Startup Error' errorPrintCR. - thisContext fullPrintAll. - ]. - ex reject. + StandAlone ifTrue:[ + DebuggingStandAlone ifFalse:[ + 'Startup Error - use --debug command line argument for more info' errorPrintCR. + Smalltalk exit:1. + ]. + 'Startup Error' errorPrintCR. + thisContext fullPrintAll. + ]. + ex reject. ] do:[ - self basicInitializeSystem + self basicInitializeSystem ]. "Modified: / 12-10-2010 / 11:27:47 / cg" @@ -696,27 +704,27 @@ objects := SpecialObjectArray. objects isNil ifTrue:[ - objects := Array new:5. + objects := Array new:5. ]. "find the first empty slot and look if already registered" firstEmptyIndex := 0. 1 to: objects size do: [:i | - obj := objects at: i. - obj == anObject ifTrue: [^ i]. "object already there, just return its index" - (obj == nil and: [firstEmptyIndex = 0]) ifTrue: [ - firstEmptyIndex := i - ] + obj := objects at: i. + obj == anObject ifTrue: [^ i]. "object already there, just return its index" + (obj == nil and: [firstEmptyIndex = 0]) ifTrue: [ + firstEmptyIndex := i + ] ]. "if no empty slots, expand the array" firstEmptyIndex = 0 ifTrue: [ - sz := objects size. - newObjects := objects species new: sz + 20. "grow linearly" - newObjects replaceFrom: 1 to: sz with: objects startingAt: 1. - firstEmptyIndex := sz + 1. - SpecialObjectArray := newObjects. - objects := newObjects + sz := objects size. + newObjects := objects species new: sz + 20. "grow linearly" + newObjects replaceFrom: 1 to: sz with: objects startingAt: 1. + firstEmptyIndex := sz + 1. + SpecialObjectArray := newObjects. + objects := newObjects ]. objects at: firstEmptyIndex put: anObject. @@ -725,14 +733,14 @@ ! removeClassNamed: aName - "Invoked from fileouts: if there is currently a class in the system named aName, then remove it. + "Invoked from fileouts: if there is currently a class in the system named aName, then remove it. If anything untoward happens, report it in the Transcript. " | oldClass | (oldClass := self at: aName asSymbol ifAbsent: [nil]) isNil ifTrue:[ - Transcript showCR: 'Removal of class named ', aName, ' ignored because it does not exist.'. - ^ self + Transcript showCR: 'Removal of class named ', aName, ' ignored because it does not exist.'. + ^ self ]. oldClass removeFromSystem ! @@ -750,9 +758,9 @@ anObject isNil ifTrue:[^ self]. objects := SpecialObjectArray. 1 to: objects size do: [:i | - (objects at: i) == anObject ifTrue: [ - objects at: i put: nil - ] + (objects at: i) == anObject ifTrue: [ + objects at: i put: nil + ] ]. ! @@ -763,13 +771,13 @@ platformName := Screen current platformName. platformName = #WIN32 ifTrue:[ - ^ #Win32. + ^ #Win32. ]. ^ platformName. " Smalltalk windowSystemName - -> 'Win32' + -> 'Win32' " ! ! @@ -790,42 +798,42 @@ declarePoolDictionary:poolDictionaryName SharedPool subclass:(poolDictionaryName asSymbol) - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:nil + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:nil ! ! !Smalltalk class methodsFor:'Compatibility-VW5.4'! -defineClass:nameSymbol superclass:superclass indexedType:indexed private:private instanceVariableNames:instVars classInstanceVariableNames:classInstVars imports:imports category:category - ^ self - defineClass:nameSymbol - superclass:superclass - indexedType:indexed - private:private - instanceVariableNames:instVars - classInstanceVariableNames:classInstVars - imports:imports - category:category - attributes:nil +defineClass:nameSymbol superclass:superclass indexedType:indexed private:private instanceVariableNames:instVars classInstanceVariableNames:classInstVars imports:imports category:category + ^ self + defineClass:nameSymbol + superclass:superclass + indexedType:indexed + private:private + instanceVariableNames:instVars + classInstanceVariableNames:classInstVars + imports:imports + category:category + attributes:nil ! defineClass:nameSymbol superclass:superclass indexedType:indexed private:private instanceVariableNames:instVars classInstanceVariableNames:classInstVars imports:imports category:category attributes:annotations |newClass| indexed == #none ifTrue:[ - newClass := superclass - subclass:nameSymbol - instanceVariableNames:instVars - classVariableNames:'' - poolDictionaries:'' - category:category - inEnvironment:self. - classInstVars size > 0 ifTrue:[ - newClass class instanceVariableNames:classInstVars. - ]. - ^ newClass + newClass := superclass + subclass:nameSymbol + instanceVariableNames:instVars + classVariableNames:'' + poolDictionaries:'' + category:category + inEnvironment:self. + classInstVars size > 0 ifTrue:[ + newClass class instanceVariableNames:classInstVars. + ]. + ^ newClass ]. self shouldImplement. ! @@ -836,7 +844,7 @@ private ifTrue:[self halt]. "/ what to do ? imports withoutSeparators notEmpty ifTrue:[self halt]. "/ what to do ? newNameSpace := NameSpace name:nameSymbol. - newNameSpace setCategory:category. + newNameSpace setCategory:category. ^ newNameSpace ! ! @@ -890,7 +898,7 @@ the evaluation of aBlock." (self includesKey:aKey) ifTrue:[ - ^ self at:aKey + ^ self at:aKey ]. ^ aBlock value @@ -906,7 +914,7 @@ Otherwise, evaluate aBlock, passing the retrieved value as argument." (self includesKey:aKey) ifTrue:[ - ^ aBlock value:(self at:aKey) + ^ aBlock value:(self at:aKey) ]. ^ nil @@ -927,23 +935,23 @@ oldValue = __GLOBAL_SET(aKey, aValue, (OBJ *)0); %}. CachedClasses notNil ifTrue:[ - oldValue isBehavior ifTrue:[ - oldValue name == aKey ifTrue:[ - CachedClasses remove:oldValue ifAbsent:[] - ] - ]. - aValue isBehavior ifTrue:[ + oldValue isBehavior ifTrue:[ + oldValue name == aKey ifTrue:[ + CachedClasses remove:oldValue ifAbsent:[] + ] + ]. + aValue isBehavior ifTrue:[ "/ aValue isMeta ifTrue:[ "/ "/ this should not happen "/ ('SMALLTALK: store a Metaclass: ' , aValue name , ' as ' , aKey) infoPrintCR. "/ ]. - aValue name == aKey ifTrue:[ - CachedClasses add:aValue - ] ifFalse:[ - CachedClasses := nil - ] - ]. + aValue name == aKey ifTrue:[ + CachedClasses add:aValue + ] ifFalse:[ + CachedClasses := nil + ] + ]. ]. ^ aValue. "/ @@ -975,7 +983,7 @@ "return the symbol under which anObject is stored - or nil" self keysDo:[:aKey | - (self at:aKey) == anObject ifTrue:[^ aKey] + (self at:aKey) == anObject ifTrue:[^ aKey] ]. ^ nil @@ -995,16 +1003,16 @@ removeKey:aKey "remove the association stored under the key-argument from the globals dictionary. WARNING: - this is somewhat dangerous: conceptionally, the association is removed, - to which machine & byte compiled code refers if it accesses a global. - If there are still global accesses in some literalArray or from machine-compiled code, - it continues to reference the globals value via that obsolete association and gets a nil - value. (which is correct) - However, if that global is later reintroduced, a new association will be created and - the new global now referenced via the new association. - The old accesses will still see nil, although the globals value is actually non-nil - (this is questionable). - To avoid this problem, the #removeClass: method never removed the key." + this is somewhat dangerous: conceptionally, the association is removed, + to which machine & byte compiled code refers if it accesses a global. + If there are still global accesses in some literalArray or from machine-compiled code, + it continues to reference the globals value via that obsolete association and gets a nil + value. (which is correct) + However, if that global is later reintroduced, a new association will be created and + the new global now referenced via the new association. + The old accesses will still see nil, although the globals value is actually non-nil + (this is questionable). + To avoid this problem, the #removeClass: method never removed the key." CachedClasses := nil. @@ -1031,7 +1039,6 @@ "Created: 20.6.1997 / 16:58:28 / cg" ! ! - !Smalltalk class methodsFor:'browsing'! browseAllCallsOn:aSelectorSymbol @@ -1064,9 +1071,9 @@ "startup a changes browser" ChangesBrowser notNil ifTrue:[ - ChangesBrowser open + ChangesBrowser open ] ifFalse:[ - self warn:'no ChangesBrowser built in' + self warn:'no ChangesBrowser built in' ] " @@ -1151,14 +1158,14 @@ oldCategory := aClass category. oldCategory ~= newCategory ifTrue:[ - aClass category:(newCategory withoutSeparators asSymbol). - - "notify change of category" - ns := aClass environment ? self. - ns changed:#organization with:(aClass -> oldCategory). - ns ~~ self ifTrue:[ - self changed:#organization with:(aClass -> oldCategory). - ] + aClass category:(newCategory withoutSeparators asSymbol). + + "notify change of category" + ns := aClass environment ? self. + ns changed:#organization with:(aClass -> oldCategory). + ns ~~ self ifTrue:[ + self changed:#organization with:(aClass -> oldCategory). + ] ]. " @@ -1175,7 +1182,7 @@ flushCachedClass:aClass CachedClasses notNil ifTrue:[ - CachedClasses remove:aClass ifAbsent:[]. + CachedClasses remove:aClass ifAbsent:[]. ]. ! @@ -1199,31 +1206,31 @@ oldName := aClass name. sym := oldNameSym := oldName asSymbol. ((self at:oldNameSym) == aClass) ifFalse:[ - "check other name ..." - (self includes:aClass) ifFalse:[ - 'Smalltalk [warning]: no such class: ' errorPrint. oldName errorPrintCR. - ^ self - ]. - " - the class has changed its name - without telling me ... - what should be done in this case ? - " - 'Smalltalk [warning]: class ' errorPrint. oldName errorPrint. - ' has changed its name' errorPrintCR. - - "/ - "/ might be an alias (i.e. removing a compatibility name) - "/ - actualName := self keyAtValue:aClass. - ('Smalltalk [info]: ' , oldName , ' is actually stored as ' , actualName , '.') infoPrintCR. - sym := actualName asSymbol. - oldName := actualName asString. - wrongName := true. + "check other name ..." + (self includes:aClass) ifFalse:[ + 'Smalltalk [warning]: no such class: ' errorPrint. oldName errorPrintCR. + ^ self + ]. + " + the class has changed its name - without telling me ... + what should be done in this case ? + " + 'Smalltalk [warning]: class ' errorPrint. oldName errorPrint. + ' has changed its name' errorPrintCR. + + "/ + "/ might be an alias (i.e. removing a compatibility name) + "/ + actualName := self keyAtValue:aClass. + ('Smalltalk [info]: ' , oldName , ' is actually stored as ' , actualName , '.') infoPrintCR. + sym := actualName asSymbol. + oldName := actualName asString. + wrongName := true. ]. ns := aClass nameSpace. aClass topOwningClass notNil ifTrue:[ - ons := aClass topOwningClass nameSpace + ons := aClass topOwningClass nameSpace ]. self at:sym put:nil. "nil it out for compiled accesses" @@ -1232,25 +1239,25 @@ "/ see comment in removeKey: on why we dont remove it here "/ "/ self removeKey:sym. "/ remove key - this actually fails, if there are - "/ still compiled code references." + "/ still compiled code references." "remove private classes" aClass privateClassesSorted do:[:somePrivateClass | - aClass privateClassesAt:(somePrivateClass nameWithoutPrefix) asSymbol put:nil. + aClass privateClassesAt:(somePrivateClass nameWithoutPrefix) asSymbol put:nil. ]. "remove class variables" names := aClass classVariableString asCollectionOfWords. names do:[:name | - cSym := aClass globalKeyForClassVar:name. - self at:cSym asSymbol put:nil. - - "/ - "/ see comment in removeKey: on why we dont remove it here - "/ - "/ self removeKey:cSym + cSym := aClass globalKeyForClassVar:name. + self at:cSym asSymbol put:nil. + + "/ + "/ see comment in removeKey: on why we dont remove it here + "/ + "/ self removeKey:cSym ]. @@ -1282,31 +1289,31 @@ Class flushSubclassInfoFor:aClass. wrongName == true ifTrue:[ - "/ - "/ an alias (i.e. removing a compatibility name) - "/ - "/ check if there are more refs to it ... - [self includes:aClass] whileTrue:[ - actualName := self keyAtValue:aClass. - ('Smalltalk [info]: ' , aClass name , ' is also registered under the name ' , actualName - , ' - remove that binding too.') infoPrintCR. - self at:actualName put:nil. - ]. + "/ + "/ an alias (i.e. removing a compatibility name) + "/ + "/ check if there are more refs to it ... + [self includes:aClass] whileTrue:[ + actualName := self keyAtValue:aClass. + ('Smalltalk [info]: ' , aClass name , ' is also registered under the name ' , actualName + , ' - remove that binding too.') infoPrintCR. + self at:actualName put:nil. + ]. ]. ns ~~ Smalltalk ifTrue:[ - ons notNil ifTrue:[ - ClassBuilder - recompileGlobalAccessorsTo:oldNameSym - in:ons - except:nil - ]. - (ns notNil and:[ns ~~ ons]) ifTrue:[ - ClassBuilder - recompileGlobalAccessorsTo:oldNameSym - in:ns - except:nil - ]. + ons notNil ifTrue:[ + ClassBuilder + recompileGlobalAccessorsTo:oldNameSym + in:ons + except:nil + ]. + (ns notNil and:[ns ~~ ons]) ifTrue:[ + ClassBuilder + recompileGlobalAccessorsTo:oldNameSym + in:ns + except:nil + ]. ]. "Modified: / 18-11-2006 / 17:16:31 / cg" @@ -1327,24 +1334,24 @@ i2 := 1. ns := self. [i2 ~~ 0] whileTrue:[ - i2 := newName indexOfSubCollection:'::' startingAt:i1. - i2 ~~ 0 ifTrue:[ - nm := newName copyFrom:i1 to:i2-1. - ns isNameSpace ifTrue:[ - subns := ns at:nm asSymbol ifAbsent:nil. - subns isNil ifTrue:[ - self error:'Nonexisting namespace: ',nm. - ^ nil. - ]. - ] ifFalse:[ - subns := ns privateClassesAt:nm asSymbol. - subns isNil ifTrue:[ - self error:'Cannot create a namespace below a class' - ] - ]. - ns := subns. - i1 := i2 + 2. - ]. + i2 := newName indexOfSubCollection:'::' startingAt:i1. + i2 ~~ 0 ifTrue:[ + nm := newName copyFrom:i1 to:i2-1. + ns isNameSpace ifTrue:[ + subns := ns at:nm asSymbol ifAbsent:nil. + subns isNil ifTrue:[ + self error:'Nonexisting namespace: ',nm. + ^ nil. + ]. + ] ifFalse:[ + subns := ns privateClassesAt:nm asSymbol. + subns isNil ifTrue:[ + self error:'Cannot create a namespace below a class' + ] + ]. + ns := subns. + i1 := i2 + 2. + ]. ]. oldName := aClass name. @@ -1355,8 +1362,8 @@ privateClasses := aClass privateClassesSorted. ((self at:oldSym) ~~ aClass) ifTrue:[ - 'Smalltalk [warning]: rename failed - name is different from key' errorPrintCR. - ^ self + 'Smalltalk [warning]: rename failed - name is different from key' errorPrintCR. + ^ self ]. "/ rename the class @@ -1365,42 +1372,42 @@ "/ change the owning class ns isNameSpace ifFalse:[ - aClass isPrivate ifTrue:[ - aClass class setOwningClass:ns. - ] ifFalse:[ - "/ sigh - must make a PrivateMetaclass from Metaclass - oldMetaclass := aClass class. - newMetaclass := PrivateMetaclass new. - newMetaclass flags:(oldMetaclass flags). - newMetaclass setSuperclass:(oldMetaclass superclass). - newMetaclass instSize:(oldMetaclass instSize). - newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString). - newMetaclass setMethodDictionary:(oldMetaclass methodDictionary). - newMetaclass setSoleInstance:aClass. - newMetaclass setOwningClass:ns. - - aClass changeClassTo:newMetaclass. - ObjectMemory flushCaches. - ] + aClass isPrivate ifTrue:[ + aClass class setOwningClass:ns. + ] ifFalse:[ + "/ sigh - must make a PrivateMetaclass from Metaclass + oldMetaclass := aClass class. + newMetaclass := PrivateMetaclass new. + newMetaclass flags:(oldMetaclass flags). + newMetaclass setSuperclass:(oldMetaclass superclass). + newMetaclass instSize:(oldMetaclass instSize). + newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString). + newMetaclass setMethodDictionary:(oldMetaclass methodDictionary). + newMetaclass setSoleInstance:aClass. + newMetaclass setOwningClass:ns. + + aClass changeClassTo:newMetaclass. + ObjectMemory flushCaches. + ] ] ifTrue:[ - aClass isPrivate ifTrue:[ - newCategory := aClass topOwningClass category. - - "/ sigh - must make a Metaclass from PrivateMetaclass - oldMetaclass := aClass class. - - newMetaclass := Metaclass new. - newMetaclass flags:(oldMetaclass flags). - newMetaclass setSuperclass:(oldMetaclass superclass). - newMetaclass instSize:(oldMetaclass instSize). - newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString). - newMetaclass setMethodDictionary:(oldMetaclass methodDictionary). - newMetaclass setSoleInstance:aClass. - - aClass category:newCategory. - aClass changeClassTo:newMetaclass. - ObjectMemory flushCaches. - ] + aClass isPrivate ifTrue:[ + newCategory := aClass topOwningClass category. + + "/ sigh - must make a Metaclass from PrivateMetaclass + oldMetaclass := aClass class. + + newMetaclass := Metaclass new. + newMetaclass flags:(oldMetaclass flags). + newMetaclass setSuperclass:(oldMetaclass superclass). + newMetaclass instSize:(oldMetaclass instSize). + newMetaclass setInstanceVariableString:(oldMetaclass instanceVariableString). + newMetaclass setMethodDictionary:(oldMetaclass methodDictionary). + newMetaclass setSoleInstance:aClass. + + aClass category:newCategory. + aClass changeClassTo:newMetaclass. + ObjectMemory flushCaches. + ] ]. aClass setName:newSym. @@ -1420,32 +1427,32 @@ names := aClass classVariableString asCollectionOfWords. names do:[:name | - oldCVSym := (oldSym , ':' , name) asSymbol. - value := self at:oldCVSym. - self at:oldCVSym put:nil. - - "/ - "/ see comment in #removeKey: on why we dont remove it it here - "/ - "/ self removeKey:cSym. - - newCVSym := (newSym , ':' , name) asSymbol. - self at:newCVSym put:value. - - oldNameToNewName at:oldCVSym put:newCVSym. + oldCVSym := (oldSym , ':' , name) asSymbol. + value := self at:oldCVSym. + self at:oldCVSym put:nil. + + "/ + "/ see comment in #removeKey: on why we dont remove it it here + "/ + "/ self removeKey:cSym. + + newCVSym := (newSym , ':' , name) asSymbol. + self at:newCVSym put:value. + + oldNameToNewName at:oldCVSym put:newCVSym. ]. "/ patch methods literal arrays from oldCVname to newCVname oldNameToNewName keysAndValuesDo:[:oldNameSym :newNameSym | - aClass withAllSubclasses do:[:aSubClass | - Transcript showCR:'changing global accesses from ''' , oldNameSym , ''' into ''' , newNameSym , ''' in class: ''' , aSubClass name , ''' ...'. - aSubClass instAndClassSelectorsAndMethodsDo:[:sel :aMethod | - aMethod changeLiteral:oldNameSym to:newNameSym - ]. - ]. - - "/ and also in privateClasses ? ... + aClass withAllSubclasses do:[:aSubClass | + Transcript showCR:'changing global accesses from ''' , oldNameSym , ''' into ''' , newNameSym , ''' in class: ''' , aSubClass name , ''' ...'. + aSubClass instAndClassSelectorsAndMethodsDo:[:sel :aMethod | + aMethod changeLiteral:oldNameSym to:newNameSym + ]. + ]. + + "/ and also in privateClasses ? ... "/ privateClasses size > 0 ifTrue:[ "/ privateClasses do:[:aPrivateClass | @@ -1468,85 +1475,85 @@ newNameSpace := aClass topNameSpace. privateClasses size > 0 ifTrue:[ - "/ must rename privateClasses as well - Class withoutUpdatingChangesDo:[ - privateClasses do:[:aPrivateClass | - self renameClass:aPrivateClass - to:(newSym , '::' , aPrivateClass nameWithoutPrefix). - - Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldName , '::' , aPrivateClass nameWithoutPrefix , ''' ...'. - aClass theNonMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol. - aClass theMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol. - aClass theNonMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol. - aClass theMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol. + "/ must rename privateClasses as well + Class withoutUpdatingChangesDo:[ + privateClasses do:[:aPrivateClass | + self renameClass:aPrivateClass + to:(newSym , '::' , aPrivateClass nameWithoutPrefix). + + Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldName , '::' , aPrivateClass nameWithoutPrefix , ''' ...'. + aClass theNonMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol. + aClass theMetaclass recompileMethodsAccessingGlobal:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol. + aClass theNonMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol. + aClass theMetaclass recompileMethodsAccessingGlobal:(aPrivateClass nameWithoutPrefix) asSymbol. "/ ClassBuilder "/ recompileGlobalAccessorsTo:(oldName , '::' , aPrivateClass nameWithoutPrefix) asSymbol "/ in:newNameSpace "/ except:nil. - ] - ] + ] + ] ]. oldNameSpace ~~ newNameSpace ifTrue:[ - "/ all those referencing the class from the old nameSpace - "/ must be recompiled ... - "/ (to now access the global from smalltalk) - - oldNameSpace ~~ Smalltalk ifTrue:[ - Transcript showCR:'recompiling methods in ''' , oldNameSpace name , ''' accessing ''' , oldName , ''' ...'. - - ClassBuilder - recompileGlobalAccessorsTo:oldName asSymbol - in:oldNameSpace - except:nil. - ]. - - "/ all referencing the class in the new namespace - "/ as well; to now access the new class. - - (newNameSpace notNil and:[newNameSpace ~~ Smalltalk]) ifTrue:[ - Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldBaseName , ''' ...'. - - ClassBuilder - recompileGlobalAccessorsTo:oldBaseName asSymbol - in:newNameSpace - except:nil. - ]. + "/ all those referencing the class from the old nameSpace + "/ must be recompiled ... + "/ (to now access the global from smalltalk) + + oldNameSpace ~~ Smalltalk ifTrue:[ + Transcript showCR:'recompiling methods in ''' , oldNameSpace name , ''' accessing ''' , oldName , ''' ...'. + + ClassBuilder + recompileGlobalAccessorsTo:oldName asSymbol + in:oldNameSpace + except:nil. + ]. + + "/ all referencing the class in the new namespace + "/ as well; to now access the new class. + + (newNameSpace notNil and:[newNameSpace ~~ Smalltalk]) ifTrue:[ + Transcript showCR:'recompiling methods in ''' , newNameSpace name , ''' accessing ''' , oldBaseName , ''' ...'. + + ClassBuilder + recompileGlobalAccessorsTo:oldBaseName asSymbol + in:newNameSpace + except:nil. + ]. ] ifFalse:[ - "/ all references to a global with my new name in my owning class - "/ must now be redirected to myself. - - aClass isPrivate ifTrue:[ - newBaseName := aClass nameWithoutNameSpacePrefix. - newBaseNameWithoutPrefix := aClass nameWithoutPrefix. - - Transcript showCR:'recompiling methods accessing ''' , oldBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'. - aClass owningClass recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix. - aClass owningClass class recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix. - - Transcript showCR:'recompiling methods accessing ''' , oldBaseName , ''' in: ''' , aClass owningClass name , ''' ...'. - aClass owningClass recompileMethodsAccessingGlobal:oldBaseName. - aClass owningClass class recompileMethodsAccessingGlobal:oldBaseName. - - Transcript showCR:'recompiling methods accessing ''' , newBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'. - aClass owningClass recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix. - aClass owningClass class recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix. - - Transcript showCR:'recompiling methods accessing ''' , newBaseName , ''' in: ''' , aClass owningClass name , ''' ...'. - aClass owningClass recompileMethodsAccessingGlobal:newBaseName. - aClass owningClass class recompileMethodsAccessingGlobal:newBaseName. - ] + "/ all references to a global with my new name in my owning class + "/ must now be redirected to myself. + + aClass isPrivate ifTrue:[ + newBaseName := aClass nameWithoutNameSpacePrefix. + newBaseNameWithoutPrefix := aClass nameWithoutPrefix. + + Transcript showCR:'recompiling methods accessing ''' , oldBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'. + aClass owningClass recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix. + aClass owningClass class recompileMethodsAccessingGlobal:oldBaseNameWithoutPrefix. + + Transcript showCR:'recompiling methods accessing ''' , oldBaseName , ''' in: ''' , aClass owningClass name , ''' ...'. + aClass owningClass recompileMethodsAccessingGlobal:oldBaseName. + aClass owningClass class recompileMethodsAccessingGlobal:oldBaseName. + + Transcript showCR:'recompiling methods accessing ''' , newBaseNameWithoutPrefix , ''' in: ''' , aClass owningClass name , ''' ...'. + aClass owningClass recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix. + aClass owningClass class recompileMethodsAccessingGlobal:newBaseNameWithoutPrefix. + + Transcript showCR:'recompiling methods accessing ''' , newBaseName , ''' in: ''' , aClass owningClass name , ''' ...'. + aClass owningClass recompileMethodsAccessingGlobal:newBaseName. + aClass owningClass class recompileMethodsAccessingGlobal:newBaseName. + ] ]. aClass changed:#definition. "/ because of the change of my superclasses name ... aClass allSubclassesDo:[:subClass | - subClass changed:#definition. + subClass changed:#definition. ]. "/ because of the change of my superclasses name ... aClass subclassesDo:[:subClass | - subClass addChangeRecordForClass:subClass. + subClass addChangeRecordForClass:subClass. ]. self changed:#definition. Smalltalk changed:#classRename with:(Array with:aClass with:oldName). @@ -1612,7 +1619,7 @@ "call the dummy debug function, on which a breakpoint can be put in adb, sdb, dbx or gdb. WARNING: this method is for debugging only - it will be removed without notice." + it will be removed without notice." %{ __PATCHUPCONTEXTS(__context); __debugBreakPoint__(); @@ -1657,9 +1664,9 @@ char *msg; if (__isStringLike(aMessage)) - msg = (char *) __stringVal(aMessage); + msg = (char *) __stringVal(aMessage); else - msg = "fatalAbort"; + msg = "fatalAbort"; __fatal0(__context, msg); /* NEVER RETURNS */ @@ -1672,7 +1679,7 @@ Usually, this is done in standAlone applications" IgnoreHalt isNil ifTrue:[ - ^ self isStandAloneApp + ^ self isStandAloneApp ]. ^ IgnoreHalt @@ -1680,7 +1687,7 @@ ! ignoreHalt:aBoolean - "control if halts are to be ignored; + "control if halts are to be ignored; usually, this is done in standAlone applications" IgnoreHalt := aBoolean @@ -1718,13 +1725,13 @@ |allCategories| allCategories := Set new. - Smalltalk allClassesDo:[:cls | - |category| - - category := cls category. - category notNil ifTrue:[ - allCategories add:category. - ]. + Smalltalk allClassesDo:[:cls | + |category| + + category := cls category. + category notNil ifTrue:[ + allCategories add:category. + ]. ]. ^ allCategories. @@ -1742,19 +1749,19 @@ |already| already := IdentitySet new:NumberOfClassesHint*2. - self allClassesDo:[:eachClass | - |cls| - - cls := eachClass theNonMetaclass. - (already includes:cls) ifFalse:[ - aBlock value:cls. - already add:cls. - ]. - cls := cls class. - (already includes:cls) ifFalse:[ - aBlock value:cls. - already add:cls. - ]. + self allClassesDo:[:eachClass | + |cls| + + cls := eachClass theNonMetaclass. + (already includes:cls) ifFalse:[ + aBlock value:cls. + already add:cls. + ]. + cls := cls class. + (already includes:cls) ifFalse:[ + aBlock value:cls. + already add:cls. + ]. ]. ! @@ -1776,13 +1783,13 @@ collectedClasses := OrderedCollection new. self allClassesForWhich:filter do:[:cls | - collectedClasses add:cls + collectedClasses add:cls ]. ^ collectedClasses " Smalltalk - allClassesForWhich:[:cls | cls name startsWith:'Po'] + allClassesForWhich:[:cls | cls name startsWith:'Po'] " "Created: / 10-08-2006 / 12:11:31 / cg" @@ -1792,13 +1799,13 @@ "evaluate the argument, aBlock for all classes in the system, for which filter evaluates to true." self allClassesDo:[:cls | - (filter value:cls) ifTrue:[ aBlock value:cls ]. + (filter value:cls) ifTrue:[ aBlock value:cls ]. ]. " Smalltalk - allClassesForWhich:[:cls | cls name startsWith:'Po'] - do:[:aClass | Transcript showCR:aClass name] + allClassesForWhich:[:cls | cls name startsWith:'Po'] + do:[:aClass | Transcript showCR:aClass name] " ! @@ -1820,7 +1827,7 @@ The order of the classes is not defined." aCategory notNil ifTrue:[ - self allClassesForWhich:[:cls | cls category = aCategory] do:aBlock + self allClassesForWhich:[:cls | cls category = aCategory] do:aBlock ] " @@ -1837,12 +1844,12 @@ |classes| aCategory notNil ifTrue:[ - classes := OrderedCollection new. - self allClassesInCategory:aCategory do:[:aClass | - classes add:aClass - ]. - classes topologicalSort:[:a :b | b isSubclassOf:a]. - classes do:aBlock + classes := OrderedCollection new. + self allClassesInCategory:aCategory do:[:aClass | + classes add:aClass + ]. + classes topologicalSort:[:a :b | b isSubclassOf:a]. + classes do:aBlock ] " @@ -1860,16 +1867,16 @@ already := IdentitySet new:NumberOfClassesHint. self allClassesDo:[:eachClass | - (already includes:eachClass) ifFalse:[ - eachClass allSuperclasses reverseDo:[:eachSuperClass | - (already includes:eachSuperClass) ifFalse:[ - already add:eachSuperClass. - aBlock value:eachSuperClass. - ]. - ]. - already add:eachClass. - aBlock value:eachClass. - ] + (already includes:eachClass) ifFalse:[ + eachClass allSuperclasses reverseDo:[:eachSuperClass | + (already includes:eachSuperClass) ifFalse:[ + already add:eachSuperClass. + aBlock value:eachSuperClass. + ]. + ]. + already add:eachClass. + aBlock value:eachClass. + ] ]. " @@ -1918,7 +1925,7 @@ allCategories := Set new. Smalltalk allClassesDo:[:cls | - allCategories addAll:cls categories. + allCategories addAll:cls categories. ]. ^ allCategories. @@ -1932,20 +1939,20 @@ "enumerate all methods in all classes" Smalltalk allClassesDo:[:eachClass | - eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | - aBlock value:mthd - ] + eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | + aBlock value:mthd + ] ]. ! allMethodsWithSelectorDo:aTwoArgBlock - "enumerate all methods in all classes and evaluate aBlock + "enumerate all methods in all classes and evaluate aBlock with method and selector as arguments." Smalltalk allClassesDo:[:eachClass | - eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | - aTwoArgBlock value:mthd value:sel - ] + eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | + aTwoArgBlock value:mthd value:sel + ] ]. ! @@ -1954,7 +1961,7 @@ in the Smalltalk dictionary" self keysDo:[:aKey | - aBlock value:(aKey -> (self at:aKey)) + aBlock value:(aKey -> (self at:aKey)) ] "Smalltalk associationsDo:[:assoc | assoc printCR]" @@ -1982,7 +1989,7 @@ RETURN (self); %}. self keysDo:[:aKey | - aBlock value:(self at:aKey) + aBlock value:(self at:aKey) ] ! @@ -1990,7 +1997,7 @@ "evaluate the two-arg block, aBlock for all keys and values" self keysDo:[:aKey | - aBlock value:aKey value:(self at:aKey) + aBlock value:aKey value:(self at:aKey) ] ! @@ -1999,16 +2006,16 @@ collected := OrderedCollection new. self keysAndValuesDo:[:eachKey :eachValue | - (selectBlockWith2Args value:eachKey value:eachValue) ifTrue:[ - collected add:(collectBlockWith2Args value:eachKey value:eachValue) - ]. + (selectBlockWith2Args value:eachKey value:eachValue) ifTrue:[ + collected add:(collectBlockWith2Args value:eachKey value:eachValue) + ]. ]. ^ collected " Smalltalk - keysAndValuesSelect:[:nm :val | (nm startsWith:'Ab') and:[val notNil]] - thenCollect:[:nm :val | nm] + keysAndValuesSelect:[:nm :val | (nm startsWith:'Ab') and:[val notNil]] + thenCollect:[:nm :val | nm] " ! @@ -2021,7 +2028,7 @@ RETURN (self); %}. self basicKeys do:[:aKey | - aBlock value:aKey + aBlock value:aKey ] ! ! @@ -2096,9 +2103,9 @@ #aboutToQuit." ExitBlocks isNil ifTrue:[ - ExitBlocks := OrderedCollection with:aBlock + ExitBlocks := OrderedCollection with:aBlock ] ifFalse:[ - ExitBlocks add:aBlock + ExitBlocks add:aBlock ] ! @@ -2110,9 +2117,9 @@ These blocks will be executed after an image restart." ImageStartBlocks isNil ifTrue:[ - ImageStartBlocks := OrderedCollection with:aBlock + ImageStartBlocks := OrderedCollection with:aBlock ] ifFalse:[ - ImageStartBlocks add:aBlock + ImageStartBlocks add:aBlock ] "Created: 9.9.1996 / 16:48:20 / stefan" @@ -2128,9 +2135,9 @@ Initial processes are usually started here (see smalltalk.rc / private.rc)." StartBlocks isNil ifTrue:[ - StartBlocks := OrderedCollection with:aBlock + StartBlocks := OrderedCollection with:aBlock ] ifFalse:[ - StartBlocks add:aBlock + StartBlocks add:aBlock ] "Created: 9.9.1996 / 16:46:53 / stefan" @@ -2157,9 +2164,9 @@ ObjectMemory changed:#aboutToExit. "/ for ST/X backward compatibility ObjectMemory changed:#aboutToQuit. "/ for ST-80 compatibility ExitBlocks notNil ifTrue:[ - ExitBlocks do:[:aBlock | - aBlock value - ] + ExitBlocks do:[:aBlock | + aBlock value + ] ]. OperatingSystem exit:statusInteger "not reached" @@ -2200,9 +2207,9 @@ (packageDirName notNil and:[Class tryLocalSourceFirst]) ifTrue:[ (self loadExtensionsFromDirectory:packageDirName language: language) ifTrue:[ - ^ true. - ]. - packageDirName := nil. "do not try again" + ^ true. + ]. + packageDirName := nil. "do not try again" ]. " @@ -2210,20 +2217,20 @@ " mgr := Smalltalk at:#SourceCodeManager. mgr notNil ifTrue:[ - SourceCodeManagerError handle:[:ex | - ] do:[ + SourceCodeManagerError handle:[:ex | + ] do:[ inStream := mgr getMostRecentSourceStreamForFile:'extensions.' , language sourceFileSuffix inPackage:aPackageId. - ]. - inStream notNil ifTrue:[ - Class withoutUpdatingChangeSetDo:[ - inStream fileIn. - ]. - inStream close. - SilentLoading ifFalse:[ - Transcript showCR:('loaded extensions for ',aPackageId,' from repository'). - ]. - ^ true - ] + ]. + inStream notNil ifTrue:[ + Class withoutUpdatingChangeSetDo:[ + inStream fileIn. + ]. + inStream close. + SilentLoading ifFalse:[ + Transcript showCR:('loaded extensions for ',aPackageId,' from repository'). + ]. + ^ true + ] ]. packageDirName notNil ifTrue:[ @@ -2255,13 +2262,13 @@ f := packageDir / ('extensions.' , language sourceFileSuffix). f exists ifTrue:[ - Class withoutUpdatingChangeSetDo:[ - f fileIn. - ]. - SilentLoading ifFalse:[ - Transcript showCR:('loaded extensions: ' , f pathName). - ]. - ^ true + Class withoutUpdatingChangeSetDo:[ + f fileIn. + ]. + SilentLoading ifFalse:[ + Transcript showCR:('loaded extensions: ' , f pathName). + ]. + ^ true ]. ^ false @@ -2270,36 +2277,38 @@ loadPackage:aPackageString asAutoloaded:doLoadAsAutoloaded "make certain, that some particular package is loaded into the system. - Return true if loaded, false otherwise." + Return true on success, false otherwise." |packageDir def sourceCodeManager| + "if I am here, so must my package" aPackageString = 'stx:libbasic' ifTrue:[^ true]. "/ if there is a projectDefinition, let it load itself... def := aPackageString asPackageId projectDefinitionClass. def notNil ifTrue:[ - ^ def loadAsAutoloaded:doLoadAsAutoloaded. + def loadAsAutoloaded:doLoadAsAutoloaded. + ^ true. ]. packageDir := self packageDirectoryForPackageId:aPackageString. packageDir isNil ifTrue:[ - (aPackageString includes:$:) ifFalse:[ - "/ assume stx - packageDir := self packageDirectoryForPackageId:('stx:',aPackageString). - ]. + (aPackageString includes:$:) ifFalse:[ + "/ assume stx + packageDir := self packageDirectoryForPackageId:('stx:',aPackageString). + ]. ]. (self - loadPackage:aPackageString - fromDirectory:packageDir - asAutoloaded:doLoadAsAutoloaded) ifTrue: [^ true]. + loadPackage:aPackageString + fromDirectory:packageDir + asAutoloaded:doLoadAsAutoloaded) ifTrue: [^ true]. AbstractSourceCodeManager notNil ifTrue:[ - sourceCodeManager := AbstractSourceCodeManager sourceCodeManagerForPackage: aPackageString. - sourceCodeManager notNil ifTrue:[ - ^ sourceCodeManager loadPackageWithId: aPackageString fromRepositoryAsAutoloaded: doLoadAsAutoloaded - ]. + sourceCodeManager := AbstractSourceCodeManager sourceCodeManagerForPackage: aPackageString. + sourceCodeManager notNil ifTrue:[ + ^ sourceCodeManager loadPackageWithId: aPackageString fromRepositoryAsAutoloaded: doLoadAsAutoloaded + ]. ]. ^ false @@ -2324,37 +2333,37 @@ "/ solution: repeat twice, so that superclasses are present the second time Class packageQuerySignal answer:packageId asSymbol do:[ - |any| - - repeatCount := 0. - [ - repeatCount := repeatCount + 1. - anyFail := false. - aDirectory directoryContents do:[:file | - |fn| - - fn := aDirectory / file. - (fn hasSuffix:'st') ifTrue:[ - Metaclass confirmationQuerySignal answer:false - do:[ - Error - handle:[:ex | - anyFail := true - ] - do:[ - (self fileIn:fn) ifFalse:[ - anyFail := true - ] ifTrue:[ - any := true. - ] - ] - ] - ] - ]. - any ifFalse:[ - ^ false "/ no file found - ] - ] doWhile:[anyFail and:[repeatCount<2]]. + |any| + + repeatCount := 0. + [ + repeatCount := repeatCount + 1. + anyFail := false. + aDirectory directoryContents do:[:file | + |fn| + + fn := aDirectory / file. + (fn hasSuffix:'st') ifTrue:[ + Metaclass confirmationQuerySignal answer:false + do:[ + Error + handle:[:ex | + anyFail := true + ] + do:[ + (self fileIn:fn) ifFalse:[ + anyFail := true + ] ifTrue:[ + any := true. + ] + ] + ] + ] + ]. + any ifFalse:[ + ^ false "/ no file found + ] + ] doWhile:[anyFail and:[repeatCount<2]]. ]. new := (p := Project projectWithId:packageId) isNil. @@ -2397,25 +2406,27 @@ p isLoaded:true. new ifTrue:[Project addLoadedProject:p]. + ^ true ! loadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded "load a package referenced by aPackageString - a string like 'stx:libbasic'. - The package is either located in packageDirOrStringOrNil, or in the current directory (if nil)" - - |packageDir packageName shLibName + The package is either located in packageDirOrStringOrNil, or in the current directory (if nil). + Answer true, if the load succeeded, false if it failed" + + |packageDir packageName shLibName binaryClassLibraryFilename projectDefinitionFilename loadAllFilename projectDefinitionClass projectDefinitionClassName silent somethingHasBeenLoaded loadOK loadErrorOccurred exePath| packageDirOrStringOrNil notNil ifTrue:[ - packageDir := packageDirOrStringOrNil asFilename. + packageDir := packageDirOrStringOrNil asFilename. ]. VerboseLoading ifTrue:[ - silent := false + silent := false ] ifFalse:[ - silent := SilentLoading | StandAlone. + silent := SilentLoading | StandAlone. ]. "For now: have to read the project definition first!! @@ -2429,36 +2440,36 @@ "if not, file it in ..." (projectDefinitionClass isNil and:[packageDir notNil]) ifTrue:[ - projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageString. - "/ try to load the project definition class - projectDefinitionFilename := (packageDir / projectDefinitionClassName) withSuffix:'st'. - projectDefinitionFilename exists ifFalse:[ - projectDefinitionFilename := (packageDir / 'source' / projectDefinitionClassName) withSuffix:'st'. - ]. - projectDefinitionFilename exists ifTrue:[ - Class withoutUpdatingChangesDo:[ - Smalltalk silentlyLoadingDo:[ - projectDefinitionFilename fileIn. - ]. - ]. - projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. - ]. + projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageString. + "/ try to load the project definition class + projectDefinitionFilename := (packageDir / projectDefinitionClassName) withSuffix:'st'. + projectDefinitionFilename exists ifFalse:[ + projectDefinitionFilename := (packageDir / 'source' / projectDefinitionClassName) withSuffix:'st'. + ]. + projectDefinitionFilename exists ifTrue:[ + Class withoutUpdatingChangesDo:[ + Smalltalk silentlyLoadingDo:[ + projectDefinitionFilename fileIn. + ]. + ]. + projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. + ]. ]. projectDefinitionClass notNil ifTrue:[ - projectDefinitionClass autoload. - somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded. - (silent not and:[somethingHasBeenLoaded]) ifTrue:[ - Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageString , ' from project definition'). - ]. - ^ true. + projectDefinitionClass autoload. + somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded. + (silent not and:[somethingHasBeenLoaded]) ifTrue:[ + Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageString , ' from project definition'). + ]. + ^ true. ]. "/ no project-definition class. - + "Is there a shared library (.dll or .so) ?" - shLibName := aPackageString asPackageId libraryName asFilename - withSuffix:ObjectFileLoader sharedLibrarySuffix. + shLibName := aPackageString asPackageId libraryName asFilename + withSuffix:ObjectFileLoader sharedLibrarySuffix. "/ silent ifFalse:[ "/ Transcript showCR:('looking for binary classLib file: ' , shLibName pathName). @@ -2466,75 +2477,75 @@ exePath := OperatingSystem pathOfSTXExecutable asFilename directory. binaryClassLibraryFilename := exePath / shLibName. binaryClassLibraryFilename exists ifFalse:[ - exePath baseName = 'bin' ifTrue:[ - binaryClassLibraryFilename := exePath directory / 'lib' / shLibName. - ]. - binaryClassLibraryFilename exists ifFalse:[ - binaryClassLibraryFilename := exePath directory / 'plugin' / shLibName. - binaryClassLibraryFilename exists ifFalse:[ + exePath baseName = 'bin' ifTrue:[ + binaryClassLibraryFilename := exePath directory / 'lib' / shLibName. + ]. + binaryClassLibraryFilename exists ifFalse:[ + binaryClassLibraryFilename := exePath directory / 'plugin' / shLibName. + binaryClassLibraryFilename exists ifFalse:[ "/ binaryClassLibraryFilename := Filename currentDirectory / shLibName. "/ binaryClassLibraryFilename exists ifFalse:[ - packageDir notNil ifTrue:[ - binaryClassLibraryFilename := packageDir / shLibName. - binaryClassLibraryFilename exists ifFalse:[ - "/ mhmh - is this a good idea ? (temporary kludge) - binaryClassLibraryFilename := packageDir / 'objbc' / shLibName. - binaryClassLibraryFilename exists ifFalse:[ - binaryClassLibraryFilename := packageDir / 'objvc' / shLibName. - ] - ] - ] + packageDir notNil ifTrue:[ + binaryClassLibraryFilename := packageDir / shLibName. + binaryClassLibraryFilename exists ifFalse:[ + "/ mhmh - is this a good idea ? (temporary kludge) + binaryClassLibraryFilename := packageDir / 'objbc' / shLibName. + binaryClassLibraryFilename exists ifFalse:[ + binaryClassLibraryFilename := packageDir / 'objvc' / shLibName. + ] + ] + ] "/ ]. - ]. - ]. + ]. + ]. ]. binaryClassLibraryFilename exists ifTrue:[ - ObjectFileLoader::ObjectFileLoadErrorNotification handle:[:ex | - loadErrorOccurred := true. - ex proceedWith:true. - ] do:[ - loadOK := self loadPackage:aPackageString fromClassLibrary:binaryClassLibraryFilename. - ]. - loadOK ifTrue:[ - silent ifFalse:[ - Transcript showCR:('loaded package: ' , aPackageString , ' from binary classLib file: ' , binaryClassLibraryFilename pathName). - ]. - doLoadAsAutoloaded ifFalse:[ - "/ force autoloading... - Smalltalk allClassesDo:[:eachClass | - eachClass package == aPackageString ifTrue:[eachClass autoload]. - ]. - ]. - ^ true - ]. - loadErrorOccurred ifTrue:[ - self breakPoint:#cg. - projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. - projectDefinitionClass notNil ifTrue:[ - "/ load prerequisites... - projectDefinitionClass loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded. - self breakPoint:#cg. - ]. - ]. + ObjectFileLoader::ObjectFileLoadErrorNotification handle:[:ex | + loadErrorOccurred := true. + ex proceedWith:true. + ] do:[ + loadOK := self loadPackage:aPackageString fromClassLibrary:binaryClassLibraryFilename. + ]. + loadOK ifTrue:[ + silent ifFalse:[ + Transcript showCR:('loaded package: ' , aPackageString , ' from binary classLib file: ' , binaryClassLibraryFilename pathName). + ]. + doLoadAsAutoloaded ifFalse:[ + "/ force autoloading... + Smalltalk allClassesDo:[:eachClass | + eachClass package == aPackageString ifTrue:[eachClass autoload]. + ]. + ]. + ^ true + ]. + loadErrorOccurred ifTrue:[ + self breakPoint:#cg. + projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString. + projectDefinitionClass notNil ifTrue:[ + "/ load prerequisites... + projectDefinitionClass loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded. + self breakPoint:#cg. + ]. + ]. ]. packageDir isNil ifTrue:[ - ^ false. + ^ false. ]. "/ loadAll ? - will be soon obsolete "/ mhmh - this will vanish soon... loadAllFilename := packageDir / 'loadAll'. loadAllFilename exists ifFalse:[ - loadAllFilename := packageDir / 'loadall'. + loadAllFilename := packageDir / 'loadall'. ]. loadAllFilename exists ifTrue:[ - (self loadPackage:aPackageString fromLoadAllFile:loadAllFilename) ifTrue:[ - silent ifFalse:[ - Transcript showCR:('loaded package: ' , aPackageString , ' from loadAll file: ' , loadAllFilename pathName). - ]. - ^ true - ] + (self loadPackage:aPackageString fromLoadAllFile:loadAllFilename) ifTrue:[ + silent ifFalse:[ + Transcript showCR:('loaded package: ' , aPackageString , ' from loadAll file: ' , loadAllFilename pathName). + ]. + ^ true + ] ]. packageName := packageDir baseName. @@ -2620,10 +2631,10 @@ Metaclass confirmationQuerySignal answer:false do:[ - (self fileIn:aFilename) ifFalse:[ - self warn:'Failed to load the package ', packageId printString. - ^ false. - ] + (self fileIn:aFilename) ifFalse:[ + self warn:'Failed to load the package ', packageId printString. + ^ false. + ] ]. new := (p := Project projectWithId:packageId) isNil. @@ -2663,13 +2674,13 @@ Smalltalk installAutoloadedClassesFrom:abbrevFile pathName. doLoadAsAutoloaded ifFalse:[ - "/ force autoloading... - Smalltalk allClassesInPackage:aPackageId do:[:eachClass | eachClass autoload]. + "/ force autoloading... + Smalltalk allClassesInPackage:aPackageId do:[:eachClass | eachClass autoload]. ]. self loadExtensionsFromDirectory:packageDir. SilentLoading ifFalse:[ - Transcript showCR:('loaded package: ' , aPackageId , ' from abbrev file: ' , abbrevFile pathName). + Transcript showCR:('loaded package: ' , aPackageId , ' from abbrev file: ' , abbrevFile pathName). ]. ^ true @@ -2693,27 +2704,27 @@ "/ If that happens, we restart the set-building here "/ [(classes := CachedClasses) isNil] whileTrue:[ - CachedClasses := classes := IdentitySet new:NumberOfClassesHint. - self keysAndValuesDo:[:eachName :eachGlobal | - (eachGlobal notNil and:[eachGlobal isBehavior]) ifTrue:[ - "/ sigh - would like to skip over aliases - "/ but this cannot be done simply by comparing - "/ the classes name against the store-key - "/ i.e. cannot do: - "/ anObject name == sym ifTrue:[ - "/ classes add:anObject - "/ ] - "/ because that would lead to ignore all java - "/ classes, which are stored under a different - "/ key. - - (eachGlobal name == eachName - or:[eachGlobal isJavaClass]) ifTrue:[ - classes add:eachGlobal - ]. - ] - ]. - NumberOfClassesHint := classes size. + CachedClasses := classes := IdentitySet new:NumberOfClassesHint. + self keysAndValuesDo:[:eachName :eachGlobal | + (eachGlobal notNil and:[eachGlobal isBehavior]) ifTrue:[ + "/ sigh - would like to skip over aliases + "/ but this cannot be done simply by comparing + "/ the classes name against the store-key + "/ i.e. cannot do: + "/ anObject name == sym ifTrue:[ + "/ classes add:anObject + "/ ] + "/ because that would lead to ignore all java + "/ classes, which are stored under a different + "/ key. + + (eachGlobal name == eachName + or:[eachGlobal isJavaClass]) ifTrue:[ + classes add:eachGlobal + ]. + ] + ]. + NumberOfClassesHint := classes size. ]. ^ classes @@ -2736,8 +2747,8 @@ classes := IdentitySet new:NumberOfClassesHint*2. self allClassesDo:[:eachClass | - classes add:(eachClass theNonMetaclass). - classes add:(eachClass theMetaclass). + classes add:(eachClass theNonMetaclass). + classes add:(eachClass theMetaclass). ]. ^ classes ! @@ -2748,13 +2759,13 @@ (i.e. anonymous ones have to be aquired by Behavior allSubInstances)" ^ self allClasses select:[:aClass | - |owner| - - (aClass isRealNameSpace not) - and:[ - owner := aClass topOwningClass. - (owner ? aClass) nameSpace == Smalltalk - ] + |owner| + + (aClass isRealNameSpace not) + and:[ + owner := aClass topOwningClass. + (owner ? aClass) nameSpace == Smalltalk + ] ] " @@ -2769,7 +2780,7 @@ methods := OrderedCollection new. self allClassesDo:[:eachClass | - methods addAll:(eachClass extensionsFrom:aProjectID). + methods addAll:(eachClass extensionsFrom:aProjectID). ]. ^ methods ! @@ -2781,12 +2792,12 @@ implementors := OrderedCollection new. self allClassesDo:[:cls | - (cls includesSelector:aSelector) ifTrue:[ - implementors add:cls. - ]. - (cls class includesSelector:aSelector) ifTrue:[ - implementors add:cls class. - ]. + (cls includesSelector:aSelector) ifTrue:[ + implementors add:cls. + ]. + (cls class includesSelector:aSelector) ifTrue:[ + implementors add:cls class. + ]. ]. ^ implementors @@ -2827,30 +2838,30 @@ allProjects := Set new. self allClassesDo:[:eachClass | - |cls pkg| - - eachClass isRealNameSpace ifFalse:[ - (includeUnloadedClasses or:[eachClass isLoaded]) ifTrue:[ - cls := eachClass theNonMetaclass. - cls isPrivate ifTrue:[ - cls := cls topOwningClass - ]. - pkg := cls package. - pkg size > 0 ifTrue:[ - allProjects add:pkg. - ] ifFalse:[ - "/ for now, nameSpaces are not in any package; - "/ this might change. Then, 0-sized packages are - "/ illegal, and the following should be enabled. - "/ self halt - ]. - cls isJavaClass ifFalse:[ - cls instAndClassSelectorsAndMethodsDo:[:sel :mthd | - allProjects add:mthd package asSymbol. - ]. - ]. - ]. - ]. + |cls pkg| + + eachClass isRealNameSpace ifFalse:[ + (includeUnloadedClasses or:[eachClass isLoaded]) ifTrue:[ + cls := eachClass theNonMetaclass. + cls isPrivate ifTrue:[ + cls := cls topOwningClass + ]. + pkg := cls package. + pkg size > 0 ifTrue:[ + allProjects add:pkg. + ] ifFalse:[ + "/ for now, nameSpaces are not in any package; + "/ this might change. Then, 0-sized packages are + "/ illegal, and the following should be enabled. + "/ self halt + ]. + cls isJavaClass ifFalse:[ + cls instAndClassSelectorsAndMethodsDo:[:sel :mthd | + allProjects add:mthd package asSymbol. + ]. + ]. + ]. + ]. ]. allProjects := allProjects asOrderedCollection sort. ^ allProjects @@ -2877,7 +2888,7 @@ classCategoryCompletion:aPartialCategory "given a partial class category name, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching categories" + 2nd: collection consisting of matching categories" ^ DoWhatIMeanSupport classCategoryCompletion:aPartialCategory inEnvironment:self @@ -2903,45 +2914,45 @@ But be careful, to not invent new symbols ..." sym := aString asSymbolIfInterned. sym notNil ifTrue:[ - cls := self at:sym ifAbsent:nil. - cls isBehavior ifTrue:[^ cls]. + cls := self at:sym ifAbsent:nil. + cls isBehavior ifTrue:[^ cls]. ]. (aString endsWith:' class') ifTrue:[ - nonMeta := self classNamed:(aString copyWithoutLast:6). - nonMeta notNil ifTrue:[ - ^ nonMeta theMetaclass - ]. + nonMeta := self classNamed:(aString copyWithoutLast:6). + nonMeta notNil ifTrue:[ + ^ nonMeta theMetaclass + ]. ]. "no success yet. Try if this is a private classes of an autoloaded class" cls isNil ifTrue:[ - idx := aString indexOfSubCollection:'::'. - idx ~~ 0 ifTrue:[ - prefix := aString copyTo:idx-1. - nsNameSymbol := prefix asSymbolIfInterned. - nsNameSymbol notNil ifTrue:[ - rest := aString copyFrom:idx+2. - namespace := self at:prefix asSymbolIfInterned ifAbsent:nil. - "namespace may be the owner of a private class. - NameSpaces and Behaviors have the same protocol" - [namespace isBehavior] whileTrue:[ - idx := rest indexOfSubCollection:'::'. - idx ~~ 0 ifTrue:[ - prefix := rest copyTo:idx-1. - rest := rest copyFrom:idx+2. - "this does an implicit autoload if required" - namespace := namespace privateClassesAt:prefix. - ] ifFalse:[ - namespace isLoaded ifTrue:[ - cls := namespace privateClassesAt:rest. - cls isBehavior ifTrue:[^ cls]. - ]. - namespace := nil. "force exit of loop" - ]. - ]. - ]. - ]. + idx := aString indexOfSubCollection:'::'. + idx ~~ 0 ifTrue:[ + prefix := aString copyTo:idx-1. + nsNameSymbol := prefix asSymbolIfInterned. + nsNameSymbol notNil ifTrue:[ + rest := aString copyFrom:idx+2. + namespace := self at:prefix asSymbolIfInterned ifAbsent:nil. + "namespace may be the owner of a private class. + NameSpaces and Behaviors have the same protocol" + [namespace isBehavior] whileTrue:[ + idx := rest indexOfSubCollection:'::'. + idx ~~ 0 ifTrue:[ + prefix := rest copyTo:idx-1. + rest := rest copyFrom:idx+2. + "this does an implicit autoload if required" + namespace := namespace privateClassesAt:prefix. + ] ifFalse:[ + namespace isLoaded ifTrue:[ + cls := namespace privateClassesAt:rest. + cls isBehavior ifTrue:[^ cls]. + ]. + namespace := nil. "force exit of loop" + ]. + ]. + ]. + ]. ]. ^ nil @@ -2977,7 +2988,7 @@ classnameCompletion:aPartialClassName "given a partial classname, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching names" + 2nd: collection consisting of matching names" ^ DoWhatIMeanSupport classnameCompletion:aPartialClassName inEnvironment:self ! @@ -2985,7 +2996,7 @@ classnameCompletion:aPartialClassName inEnvironment:anEnvironment "given a partial classname, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching names" + 2nd: collection consisting of matching names" ^ DoWhatIMeanSupport classnameCompletion:aPartialClassName inEnvironment:anEnvironment @@ -3016,7 +3027,7 @@ globalNameCompletion:aPartialGlobalName "given a partial globalName, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching names" + 2nd: collection consisting of matching names" ^ DoWhatIMeanSupport globalNameCompletion:aPartialGlobalName inEnvironment:self match:true @@ -3034,7 +3045,7 @@ globalnameCompletion:aPartialGlobalName "given a partial globalName, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching names" + 2nd: collection consisting of matching names" self obsoleteMethodWarning:'use #globalNameCompletion:'. @@ -3127,11 +3138,11 @@ i := aKey lastIndexOf:$:. i ~~ 0 ifTrue:[ - i > 1 ifTrue:[ - (aKey at:(i-1)) == $: ifFalse:[ - ^ true. - ]. - ]. + i > 1 ifTrue:[ + (aKey at:(i-1)) == $: ifFalse:[ + ^ true. + ]. + ]. ]. ^ false. @@ -3153,15 +3164,15 @@ But be careful, to not invent new symbols ..." sym := aString asSymbolIfInterned. sym notNil ifTrue:[ - cls := self at:sym ifAbsent:nil. - cls isBehavior ifTrue:[^ cls]. + cls := self at:sym ifAbsent:nil. + cls isBehavior ifTrue:[^ cls]. ]. (aString endsWith:' class') ifTrue:[ - nonMeta := self loadedClassNamed:(aString copyWithoutLast:6). - nonMeta notNil ifTrue:[ - ^ nonMeta theMetaclass - ]. + nonMeta := self loadedClassNamed:(aString copyWithoutLast:6). + nonMeta notNil ifTrue:[ + ^ nonMeta theMetaclass + ]. ]. ^ nil @@ -3182,7 +3193,7 @@ methodProtocolCompletion:aPartialProtocolName "given a partial method protocol name, return an array consisting of 2 entries: 1st: the best (longest) match - 2nd: collection consisting of matching protocols" + 2nd: collection consisting of matching protocols" ^ DoWhatIMeanSupport methodProtocolCompletion:aPartialProtocolName inEnvironment:self @@ -3211,10 +3222,10 @@ "redefined, since the references are only kept in the VM's symbol table" self keysAndValuesDo:[:key :val | - aCollection do:[:anObject | - (key == anObject) ifTrue:[^ true]. - (val == anObject ) ifTrue:[^ true]. - ] + aCollection do:[:anObject | + (key == anObject) ifTrue:[^ true]. + (val == anObject ) ifTrue:[^ true]. + ] ]. ^ super referencesAny:aCollection @@ -3225,8 +3236,8 @@ "redefined, since the references are only kept in the VM's symbol table" self keysAndValuesDo:[:key :val | - (key isKindOf:aClass) ifTrue:[^ true]. - (val isKindOf:aClass) ifTrue:[^ true]. + (key isKindOf:aClass) ifTrue:[^ true]. + (val isKindOf:aClass) ifTrue:[^ true]. ]. ^ super referencesDerivedInstanceOf:aClass ! @@ -3235,8 +3246,8 @@ "redefined, since the references are only kept in the VM's symbol table" self keysAndValuesDo:[:key :val | - (key isMemberOf:aClass) ifTrue:[^ true]. - (val isMemberOf:aClass) ifTrue:[^ true]. + (key isMemberOf:aClass) ifTrue:[^ true]. + (val isMemberOf:aClass) ifTrue:[^ true]. ]. ^ super referencesInstanceOf:aClass ! @@ -3245,8 +3256,8 @@ "redefined, since the references are only kept in the VM's symbol table" self keysAndValuesDo:[:key :val | - (key == anObject) ifTrue:[^ true]. - (val == anObject ) ifTrue:[^ true]. + (key == anObject) ifTrue:[^ true]. + (val == anObject ) ifTrue:[^ true]. ]. ^ super referencesObject:anObject @@ -3268,8 +3279,8 @@ aName := nameIn. (aName startsWith:'Smalltalk::') ifTrue:[ - aName := aName copyFrom:12. - ^ self at:(aName asSymbol) ifAbsent:nil. + aName := aName copyFrom:12. + ^ self at:(aName asSymbol) ifAbsent:nil. ]. sym := aName asSymbol. @@ -3279,12 +3290,12 @@ ns := aClass nameSpace. (ns notNil and:[ns ~~ Smalltalk]) ifTrue:[ - ns isNameSpace ifTrue:[ - cls := ns at:sym ifAbsent:nil. - ] ifFalse:[ - cls := ns privateClassesAt:sym - ]. - cls notNil ifTrue:[^ cls]. + ns isNameSpace ifTrue:[ + cls := ns at:sym ifAbsent:nil. + ] ifFalse:[ + cls := ns privateClassesAt:sym + ]. + cls notNil ifTrue:[^ cls]. ]. ^ self at:sym ifAbsent:nil. @@ -3294,7 +3305,7 @@ selectorCompletion:aPartialSymbolName "given a partial selector, return an array consisting of 2 entries: 1st: the longest match - 2nd: collection consisting of matching implemented selectors" + 2nd: collection consisting of matching implemented selectors" ^ DoWhatIMeanSupport selectorCompletion:aPartialSymbolName inEnvironment:self ! @@ -3302,7 +3313,7 @@ selectorCompletion:aPartialSymbolName inEnvironment:anEnvironment "given a partial selector, return an array consisting of 2 entries: 1st: the longest match - 2nd: collection consisting of matching implemented selectors" + 2nd: collection consisting of matching implemented selectors" ^ DoWhatIMeanSupport selectorCompletion:aPartialSymbolName inEnvironment:anEnvironment @@ -3409,10 +3420,10 @@ idx := CommandLineArguments indexOf:'--browserParameters:'. idx ~~ 0 ifTrue:[ - params := Dictionary new. - (CommandLineArguments copyFrom:idx+1) pairWiseDo:[:key :value | - params at:key put:value. - ]. + params := Dictionary new. + (CommandLineArguments copyFrom:idx+1) pairWiseDo:[:key :value | + params at:key put:value. + ]. ]. 'browserWindow is: ' errorPrint. windowID errorPrintCR. @@ -3420,9 +3431,9 @@ 'Display is: ' errorPrint. Display errorPrintCR. process := [ - PluginSupport - startInBrowserWithWindowID:windowID - parameters:params. + PluginSupport + startInBrowserWithWindowID:windowID + parameters:params. ] newProcess. process priority:(Processor userSchedulingPriority). process name:'browser start handler'. @@ -3462,42 +3473,42 @@ thisIsARestart := imageName notNil. graphicalMode ifTrue:[ - Display isNil ifTrue:[ - (StartupClass notNil - and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[ - self openDisplay. - ]. - ]. + Display isNil ifTrue:[ + (StartupClass notNil + and:[ (StartupClass perform:#isHeadless ifNotUnderstood:false) ]) ifFalse:[ + self openDisplay. + ]. + ]. ]. StandAlone ifFalse:[ - " - enable the graphical debugger/inspector - (they could have been (re)defined as autoloaded in the patches file) - " - self initStandardTools. + " + enable the graphical debugger/inspector + (they could have been (re)defined as autoloaded in the patches file) + " + self initStandardTools. ]. " if there is a display, start its event dispatcher " Display notNil ifTrue:[ - Display deviceIOTimeoutErrorSignal handlerBlock:[:ex | - SaveEmergencyImage == true ifTrue:[ - 'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR. - ObjectMemory primSnapShotOn:'crash.img'. - ]. - 'Display [warning]: broken display connection - exit.' infoPrintCR. - self exit. - ]. - Display startDispatch. + Display deviceIOTimeoutErrorSignal handlerBlock:[:ex | + SaveEmergencyImage == true ifTrue:[ + 'Display [warning]: broken display connection - emergency save in ''crash.img''.' infoPrintCR. + ObjectMemory primSnapShotOn:'crash.img'. + ]. + 'Display [warning]: broken display connection - exit.' infoPrintCR. + self exit. + ]. + Display startDispatch. ]. idx := CommandLineArguments indexOf:'--browserWindow:'. IsPlugin := (idx ~~ 0). IsPlugin ifTrue:[ - self browserWindowStartup. - "/ not reached + self browserWindowStartup. + "/ not reached ]. Initializing := false. @@ -3508,49 +3519,49 @@ "/ Therefore, it is now done by an extra user-process. process := [ - StartBlocks notNil ifTrue:[ - StartBlocks do:[:aBlock| - aBlock value - ]. - StartBlocks := nil. - ]. - ImageStartBlocks notNil ifTrue:[ - ImageStartBlocks do:[:aBlock| - aBlock value - ]. - ]. - StandAlone ifFalse:[ - (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false" - thisIsARestart ifTrue:[ - Transcript cr. - Transcript showCR:('Smalltalk restarted from:' - , imageName - , ' (saved ' - , ObjectMemory imageSaveTime printString - , ')' ). - ] ifFalse:[ - Transcript showCR:(self hello). - Transcript showCR:(self copyrightString). - ]. - Transcript cr. - ]. - - DemoMode==true ifTrue:[ - Transcript showCR:'*** Restricted use: ***'. - Transcript showCR:'*** This program may be used for education only. ***'. - Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'. - Transcript showCR:'*** for more details. ***'. - Transcript cr. - ]. - ]. - - thisIsARestart ifTrue:[ - "/ - "/ the final late notification - users can now assume that - "/ views, forms etc. have been recreated. - - ObjectMemory changed:#returnFromSnapshot. - ] + StartBlocks notNil ifTrue:[ + StartBlocks do:[:aBlock| + aBlock value + ]. + StartBlocks := nil. + ]. + ImageStartBlocks notNil ifTrue:[ + ImageStartBlocks do:[:aBlock| + aBlock value + ]. + ]. + StandAlone ifFalse:[ + (SilentLoading == true) ifFalse:[ "i.e. undefined counts as false" + thisIsARestart ifTrue:[ + Transcript cr. + Transcript showCR:('Smalltalk restarted from:' + , imageName + , ' (saved ' + , ObjectMemory imageSaveTime printString + , ')' ). + ] ifFalse:[ + Transcript showCR:(self hello). + Transcript showCR:(self copyrightString). + ]. + Transcript cr. + ]. + + DemoMode==true ifTrue:[ + Transcript showCR:'*** Restricted use: ***'. + Transcript showCR:'*** This program may be used for education only. ***'. + Transcript showCR:'*** Please read the files COPYRIGHT and LICENSE ***'. + Transcript showCR:'*** for more details. ***'. + Transcript cr. + ]. + ]. + + thisIsARestart ifTrue:[ + "/ + "/ the final late notification - users can now assume that + "/ views, forms etc. have been recreated. + + ObjectMemory changed:#returnFromSnapshot. + ] ] newProcess. @@ -3567,64 +3578,64 @@ "/ message. (StartupClass notNil and:[StartupSelector notNil]) ifTrue:[ - " - allow more customization by reading an image specific rc-file - " - thisIsARestart ifTrue:[ - (imageName asFilename hasSuffix:'img') ifTrue:[ - imageName := imageName copyWithoutLast:4 - ]. - self fileIn:(imageName , '.rc') - ]. + " + allow more customization by reading an image specific rc-file + " + thisIsARestart ifTrue:[ + (imageName asFilename hasSuffix:'img') ifTrue:[ + imageName := imageName copyWithoutLast:4 + ]. + self fileIn:(imageName , '.rc') + ]. "/ Display notNil ifTrue:[ "/ Display exitOnLastClose:true. "/ ]. "/ Processor exitWhenNoMoreUserProcesses:true. - process := [ - StandAlone ifTrue:[ - AbortOperationRequest handle:[:ex | - 'Smalltalk [info]: aborted - exit.' infoPrintCR. - OperatingSystem exit:1 - ] do:[ - StartupClass perform:StartupSelector withArguments:StartupArguments. - ] - ] ifFalse:[ - StartupClass perform:StartupSelector withArguments:StartupArguments. - ]. - - "/ - "/ non-GUI apps exit after the startup; - "/ assume that GUI apps have created & opened some view ... - "/ - Display isNil ifTrue:[ - 'Smalltalk [info]: no Display - exit.' infoPrintCR. - Smalltalk exit. - ]. - "/ - "/ GUI apps exit after the last user process has finished - "/ - Display exitOnLastClose:true. - Processor exitWhenNoMoreUserProcesses:true. - ] newProcess. - process priority:(Processor userSchedulingPriority). - process name:'main'. - process beGroupLeader. - process resume. - process := true. "do not refer to process" + process := [ + StandAlone ifTrue:[ + AbortOperationRequest handle:[:ex | + 'Smalltalk [info]: aborted - exit.' infoPrintCR. + OperatingSystem exit:1 + ] do:[ + StartupClass perform:StartupSelector withArguments:StartupArguments. + ] + ] ifFalse:[ + StartupClass perform:StartupSelector withArguments:StartupArguments. + ]. + + "/ + "/ non-GUI apps exit after the startup; + "/ assume that GUI apps have created & opened some view ... + "/ + Display isNil ifTrue:[ + 'Smalltalk [info]: no Display - exit.' infoPrintCR. + Smalltalk exit. + ]. + "/ + "/ GUI apps exit after the last user process has finished + "/ + Display exitOnLastClose:true. + Processor exitWhenNoMoreUserProcesses:true. + ] newProcess. + process priority:(Processor userSchedulingPriority). + process name:'main'. + process beGroupLeader. + process resume. + process := true. "do not refer to process" ]. StandAlone ifTrue:[ - Display notNil ifTrue:[ - FlyByHelp notNil ifTrue:[ - FlyByHelp start - ]. - ]. + Display notNil ifTrue:[ + FlyByHelp notNil ifTrue:[ + FlyByHelp start + ]. + ]. ]. (StartupClass perform:#keepSplashWindowOpen ifNotUnderstood:[false]) ifFalse:[ - self hideSplashWindow. "/ if there is one, its now time to hide it + self hideSplashWindow. "/ if there is one, its now time to hide it ]. " @@ -3634,13 +3645,13 @@ ((Display notNil and:[graphicalMode]) or:[process notNil or:[HeadlessOperation]]) ifTrue:[ - Processor dispatchLoop. - "done - the last process finished" - 'Smalltalk [info]: last process finished - exit.' infoPrintCR. + Processor dispatchLoop. + "done - the last process finished" + 'Smalltalk [info]: last process finished - exit.' infoPrintCR. ] ifFalse:[ - StandAlone ifFalse:[ - self readEvalPrint - ] + StandAlone ifFalse:[ + self readEvalPrint + ] ]. self exit @@ -3657,27 +3668,27 @@ 'Smalltalk [info]: opening display...' infoPrintCR. Display isNil ifTrue:[ - Screen notNil ifTrue:[ - [ - Screen openDefaultDisplay:nil. - ] on:Screen deviceOpenErrorSignal do:[:ex| - ('Smalltalk [error]: No Display connection to: ', ex parameter printString) errorPrintCR. - 'Smalltalk [info]: Either set the DISPLAY environment variable,' infoPrintCR. - 'Smalltalk [info]: or start smalltalk with a -display argument.' infoPrintCR. - HeadlessOperation == true ifFalse:[ - OperatingSystem exit:1. - ]. - ]. - - Display notNil ifTrue:[ - (self secureFileIn:'display.rc') ifFalse:[ - "/ 'Smalltalk [warning]: no display.rc found; screen setting might be wrong.' errorPrintCR. - (self secureFileIn:'keyboard.rc') ifFalse:[ - "/ 'Smalltalk [warning]: no keyboard.rc found; shortkey setting might be wrong.' errorPrintCR. - ] - ] - ]. - ] + Screen notNil ifTrue:[ + [ + Screen openDefaultDisplay:nil. + ] on:Screen deviceOpenErrorSignal do:[:ex| + ('Smalltalk [error]: No Display connection to: ', ex parameter printString) errorPrintCR. + 'Smalltalk [info]: Either set the DISPLAY environment variable,' infoPrintCR. + 'Smalltalk [info]: or start smalltalk with a -display argument.' infoPrintCR. + HeadlessOperation == true ifFalse:[ + OperatingSystem exit:1. + ]. + ]. + + Display notNil ifTrue:[ + (self secureFileIn:'display.rc') ifFalse:[ + "/ 'Smalltalk [warning]: no display.rc found; screen setting might be wrong.' errorPrintCR. + (self secureFileIn:'keyboard.rc') ifFalse:[ + "/ 'Smalltalk [warning]: no keyboard.rc found; shortkey setting might be wrong.' errorPrintCR. + ] + ] + ]. + ] ] "Created: / 06-12-2006 / 15:38:17 / cg" @@ -3699,15 +3710,15 @@ #earlySystemInstallation is sent for ST80 compatibility #earlyRestart is send first, nothing has been setup yet. - (should be used to flush all device dependent entries) + (should be used to flush all device dependent entries) #restarted is send right after. - (should be used to recreate external resources (fds, bitmaps etc) + (should be used to recreate external resources (fds, bitmaps etc) #returnFromSnapshot is sent last - (should be used to restart processes, reOpen Streams which cannot - be automatically be reopened (i.e. Sockets, Pipes) and so on. - (Notice that positionable fileStreams are already reopened and repositioned) + (should be used to restart processes, reOpen Streams which cannot + be automatically be reopened (i.e. Sockets, Pipes) and so on. + (Notice that positionable fileStreams are already reopened and repositioned) " |deb insp transcript idx| @@ -3731,12 +3742,12 @@ idx := CommandLineArguments indexOf:'-q'. idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--silent'. + idx := CommandLineArguments indexOf:'--silent'. ]. idx ~~ 0 ifTrue:[ - Object infoPrinting:false. - ObjectMemory infoPrinting:false. - CommandLineArguments removeAtIndex:idx. + Object infoPrinting:false. + ObjectMemory infoPrinting:false. + CommandLineArguments removeAtIndex:idx. ]. "/ @@ -3771,7 +3782,7 @@ insp := Inspector. deb := Debugger. deb notNil ifTrue:[ - deb reinitialize + deb reinitialize ]. Inspector := MiniInspector. Debugger := MiniDebugger. @@ -3784,7 +3795,7 @@ "/ ObjectFileLoader; therefore, must reload before doing any notifications. ObjectFileLoader notNil ifTrue:[ - ObjectFileLoader reloadAllRememberedObjectFiles. + ObjectFileLoader reloadAllRememberedObjectFiles. ]. "/ @@ -3793,9 +3804,9 @@ "/ a display during early startup. Screen notNil ifTrue:[ - Screen allScreens do:[:aDisplay | - aDisplay invalidateConnection - ]. + Screen allScreens do:[:aDisplay | + aDisplay invalidateConnection + ]. ]. ObjectMemory changed:#earlySystemInstallation. @@ -3811,7 +3822,7 @@ "/ (mostly view/GC/color & font stuff) ObjectMemory - changed:#earlyRestart; changed:#restarted. + changed:#earlyRestart; changed:#restarted. "/ "/ start catching SIGINT and SIGQUIT @@ -3825,75 +3836,75 @@ idx := CommandLineArguments indexOf:'--faststart'. idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--fastStart'. + idx := CommandLineArguments indexOf:'--fastStart'. ]. idx ~~ 0 ifTrue:[ - CommandLineArguments removeAtIndex:idx. + CommandLineArguments removeAtIndex:idx. ] ifFalse:[ - CallbackSignal := QuerySignal new. - [ - Class withoutUpdatingChangesDo:[ - (self fileIn:(self commandName , '_r.rc')) ifFalse:[ - "no _r.rc file where executable is; try default smalltalk_r.rc" - self fileIn:'smalltalk_r.rc' - ]. - ] - ] on:CallbackSignal do:[:ex| - "/ now, display and view-stuff works; - "/ back to the previous debugging interface - - Inspector := insp. - Debugger := deb. - - "/ reinstall Transcript, if not changed during restart. - "/ if there was no Transcript, go to stderr - - (transcript notNil and:[Transcript == Stderr]) ifTrue:[ - Transcript := transcript. - ]. - Initializing := false. - ex proceed. - ]. - CallbackSignal := nil. + CallbackSignal := QuerySignal new. + [ + Class withoutUpdatingChangesDo:[ + (self fileIn:(self commandName , '_r.rc')) ifFalse:[ + "no _r.rc file where executable is; try default smalltalk_r.rc" + self fileIn:'smalltalk_r.rc' + ]. + ] + ] on:CallbackSignal do:[:ex| + "/ now, display and view-stuff works; + "/ back to the previous debugging interface + + Inspector := insp. + Debugger := deb. + + "/ reinstall Transcript, if not changed during restart. + "/ if there was no Transcript, go to stderr + + (transcript notNil and:[Transcript == Stderr]) ifTrue:[ + Transcript := transcript. + ]. + Initializing := false. + ex proceed. + ]. + CallbackSignal := nil. ]. "/ reinitialization (restart) of Display is normally performed "/ in the restart script. If this has not been run for some reason, "/ do in now. Initializing ifTrue:[ - Display notNil ifTrue:[ - [ - Display reinitializeFor:Screen defaultDisplayName. - ] on:Screen deviceOpenErrorSignal do:[ - 'Smalltalk [error]: Cannot restart connection to: ' errorPrint. - Screen defaultDisplayName errorPrintCR. - OperatingSystem exit:1. - ]. - ]. - "/ now, display and view-stuff works; - "/ back to the previous debugging interface - - Inspector := insp. - Debugger := deb. - - "/ reinstall Transcript, if not changed during restart. - "/ if there was no Transcript, go to stderr - - (transcript notNil and:[Transcript == Stderr]) ifTrue:[ - Transcript := transcript. - ]. - Initializing := false. + Display notNil ifTrue:[ + [ + Display reinitializeFor:Screen defaultDisplayName. + ] on:Screen deviceOpenErrorSignal do:[ + 'Smalltalk [error]: Cannot restart connection to: ' errorPrint. + Screen defaultDisplayName errorPrintCR. + OperatingSystem exit:1. + ]. + ]. + "/ now, display and view-stuff works; + "/ back to the previous debugging interface + + Inspector := insp. + Debugger := deb. + + "/ reinstall Transcript, if not changed during restart. + "/ if there was no Transcript, go to stderr + + (transcript notNil and:[Transcript == Stderr]) ifTrue:[ + Transcript := transcript. + ]. + Initializing := false. ]. Screen notNil ifTrue:[ - "clean up leftover screens (and views) that haven't been reopened. - Operate on a copy, since brokenConnection removes us from AllScreens" - Screen allScreens copy do:[:eachDisplay | - eachDisplay isOpen ifFalse:[ - 'Smalltalk [info]: cannot reopen secondary display: ' errorPrint. - eachDisplay errorPrintCR. - eachDisplay cleanupAfterDispatch; brokenConnection. - ] - ]. + "clean up leftover screens (and views) that haven't been reopened. + Operate on a copy, since brokenConnection removes us from AllScreens" + Screen allScreens copy do:[:eachDisplay | + eachDisplay isOpen ifFalse:[ + 'Smalltalk [info]: cannot reopen secondary display: ' errorPrint. + eachDisplay errorPrintCR. + eachDisplay cleanupAfterDispatch; brokenConnection. + ] + ]. ]. deb := insp := transcript := nil. "avoid dangling refs" @@ -3920,11 +3931,11 @@ int clr = 0; if (__isStringLike(aMessageStringOrNil)) { - msg = __stringVal(aMessageStringOrNil); + msg = __stringVal(aMessageStringOrNil); } if (__isSmallInteger(rgbValueOrNil)) { - clr = __intVal(rgbValueOrNil); - __win32_splashMessageColor(clr); + clr = __intVal(rgbValueOrNil); + __win32_splashMessageColor(clr); } __win32_splashMessage(msg); #endif @@ -3953,151 +3964,151 @@ while reading patches- and rc-file, do not add things into change-file " Class withoutUpdatingChangesDo:[ - |commandFile defaultRC prevCatchSetting| - - didReadRCFile := false. - - StandAlone ifFalse:[ - "/ - "/ look for any '-q', '-e' or '-f' command line arguments - "/ and handle them; - "/ read startup and patches file - "/ - idx := CommandLineArguments indexOf:'-q'. - idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--silent'. - ]. - idx ~~ 0 ifTrue:[ - Object infoPrinting:false. - ObjectMemory infoPrinting:false. - CommandLineArguments removeAtIndex:idx. - ]. - - "/ look for a '-e filename' or '--execute filename' argument - "/ this will force fileIn of filename only, no standard startup. - - idx := CommandLineArguments indexOf:'-e'. - idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--execute'. - idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--script'. - idx ~~ 0 ifTrue:[ - SilentLoading := true. - ]. - ]. - ]. - idx ~~ 0 ifTrue:[ - CommandName := arg := CommandLineArguments at:idx + 1. - - CommandLineArguments - removeAtIndex:idx+1; removeAtIndex:idx. - - arg = '-' ifTrue:[ - self fileInStream:Stdin - lazy:nil - silent:nil - logged:false - addPath:nil - ] ifFalse:[ - self fileIn:arg. - ]. - self exit - ]. - - "/ look for a '-E expr' or '--eval expr' argument - "/ this will force evaluation of expr only, no standard startup - idx := CommandLineArguments indexOf:'-E'. - idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--eval'. - ]. - idx ~~ 0 ifTrue:[ - arg := CommandLineArguments at:idx + 1. - - CommandLineArguments - removeAtIndex:idx+1; removeAtIndex:idx. - - self - fileInStream:arg readStream - lazy:nil - silent:nil - logged:false - addPath:nil. - - self exit - ]. - - "look for a '-f filename' or '--file filename' argument - this will force evaluation of filename instead of smalltalk.rc" - - idx := CommandLineArguments indexOf:'-f'. - idx == 0 ifTrue:[ - idx := CommandLineArguments indexOf:'--file'. - ]. - idx ~~ 0 ifTrue:[ - CommandName := commandFile := CommandLineArguments at:idx+1. - CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx. - ]. - ]. - - commandFile notNil ifTrue:[ - (self secureFileIn:commandFile) ifFalse:[ - ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR. - OperatingSystem exit:1. - ]. - ] ifFalse:[ - "/ look for .rc - "/ if not found, read smalltalk.rc (or stxapp.rc for standAlone operation) - - commandFile := self commandName asFilename withSuffix:'rc'. - (didReadRCFile := self secureFileIn:commandFile) ifFalse:[ - StandAlone ifFalse:[ - defaultRC := 'smalltalk.rc' - ] ifTrue:[ - defaultRC := 'stxapp.rc' - ]. - - didReadRCFile := self secureFileIn:defaultRC. - didReadRCFile ifFalse:[ - StandAlone ifFalse:[ - 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR. - graphicalMode := false. - ] - ] - ]. - - "/ ('StandAlone is %1' bindWith:StandAlone) printCR. - "/ ('Headless is %1' bindWith:HeadlessOperation) printCR. - "/ ('Display is %1' bindWith:Display) printCR. - "/ ('Screen is %1' bindWith:Screen) printCR. - - didReadRCFile ifFalse:[ - self secureFileIn:'private.rc'. - - "/ - "/ No RC file found; - "/ Setup more default stuff - "/ - StandAlone ifFalse:[ - "/ its a smalltalk - proceed in interpreter. - 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR. - graphicalMode := false. - ]. - - "/ setup more defaults... - ObjectMemory startBackgroundCollectorAt:5. - ObjectMemory startBackgroundFinalizationAt:5. - self addStartBlock:[ - Processor startTimeSlicing. - Processor supportDynamicPriorities:true. - ObjectMemory backgroundCollectProcess priorityRange:(4 to:9). - ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9). - ]. - ]. - ]. + |commandFile defaultRC prevCatchSetting| + + didReadRCFile := false. + + StandAlone ifFalse:[ + "/ + "/ look for any '-q', '-e' or '-f' command line arguments + "/ and handle them; + "/ read startup and patches file + "/ + idx := CommandLineArguments indexOf:'-q'. + idx == 0 ifTrue:[ + idx := CommandLineArguments indexOf:'--silent'. + ]. + idx ~~ 0 ifTrue:[ + Object infoPrinting:false. + ObjectMemory infoPrinting:false. + CommandLineArguments removeAtIndex:idx. + ]. + + "/ look for a '-e filename' or '--execute filename' argument + "/ this will force fileIn of filename only, no standard startup. + + idx := CommandLineArguments indexOf:'-e'. + idx == 0 ifTrue:[ + idx := CommandLineArguments indexOf:'--execute'. + idx == 0 ifTrue:[ + idx := CommandLineArguments indexOf:'--script'. + idx ~~ 0 ifTrue:[ + SilentLoading := true. + ]. + ]. + ]. + idx ~~ 0 ifTrue:[ + CommandName := arg := CommandLineArguments at:idx + 1. + + CommandLineArguments + removeAtIndex:idx+1; removeAtIndex:idx. + + arg = '-' ifTrue:[ + self fileInStream:Stdin + lazy:nil + silent:nil + logged:false + addPath:nil + ] ifFalse:[ + self fileIn:arg. + ]. + self exit + ]. + + "/ look for a '-E expr' or '--eval expr' argument + "/ this will force evaluation of expr only, no standard startup + idx := CommandLineArguments indexOf:'-E'. + idx == 0 ifTrue:[ + idx := CommandLineArguments indexOf:'--eval'. + ]. + idx ~~ 0 ifTrue:[ + arg := CommandLineArguments at:idx + 1. + + CommandLineArguments + removeAtIndex:idx+1; removeAtIndex:idx. + + self + fileInStream:arg readStream + lazy:nil + silent:nil + logged:false + addPath:nil. + + self exit + ]. + + "look for a '-f filename' or '--file filename' argument + this will force evaluation of filename instead of smalltalk.rc" + + idx := CommandLineArguments indexOf:'-f'. + idx == 0 ifTrue:[ + idx := CommandLineArguments indexOf:'--file'. + ]. + idx ~~ 0 ifTrue:[ + CommandName := commandFile := CommandLineArguments at:idx+1. + CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx. + ]. + ]. + + commandFile notNil ifTrue:[ + (self secureFileIn:commandFile) ifFalse:[ + ('Smalltalk [error]: startup file "', commandFile, '" not found.') errorPrintCR. + OperatingSystem exit:1. + ]. + ] ifFalse:[ + "/ look for .rc + "/ if not found, read smalltalk.rc (or stxapp.rc for standAlone operation) + + commandFile := self commandName asFilename withSuffix:'rc'. + (didReadRCFile := self secureFileIn:commandFile) ifFalse:[ + StandAlone ifFalse:[ + defaultRC := 'smalltalk.rc' + ] ifTrue:[ + defaultRC := 'stxapp.rc' + ]. + + didReadRCFile := self secureFileIn:defaultRC. + didReadRCFile ifFalse:[ + StandAlone ifFalse:[ + 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR. + graphicalMode := false. + ] + ] + ]. + + "/ ('StandAlone is %1' bindWith:StandAlone) printCR. + "/ ('Headless is %1' bindWith:HeadlessOperation) printCR. + "/ ('Display is %1' bindWith:Display) printCR. + "/ ('Screen is %1' bindWith:Screen) printCR. + + didReadRCFile ifFalse:[ + self secureFileIn:'private.rc'. + + "/ + "/ No RC file found; + "/ Setup more default stuff + "/ + StandAlone ifFalse:[ + "/ its a smalltalk - proceed in interpreter. + 'Smalltalk [warning]: no startup rc-file found. Going into line-by-line interpreter.' infoPrintCR. + graphicalMode := false. + ]. + + "/ setup more defaults... + ObjectMemory startBackgroundCollectorAt:5. + ObjectMemory startBackgroundFinalizationAt:5. + self addStartBlock:[ + Processor startTimeSlicing. + Processor supportDynamicPriorities:true. + ObjectMemory backgroundCollectProcess priorityRange:(4 to:9). + ObjectMemory backgroundFinalizationProcess priorityRange:(4 to:9). + ]. + ]. + ]. ]. HeadlessOperation ifTrue:[ - graphicalMode := false. + graphicalMode := false. ]. self mainStartup:graphicalMode @@ -4112,23 +4123,23 @@ |p| p := - [ - |startBlocks| - - startBlocks := self startBlocks. - startBlocks notNil ifTrue:[ - startBlocks do:[:aBlock| - aBlock value - ]. - startBlocks removeAll. - ]. - ] newProcess. + [ + |startBlocks| + + startBlocks := self startBlocks. + startBlocks notNil ifTrue:[ + startBlocks do:[:aBlock| + aBlock value + ]. + startBlocks removeAll. + ]. + ] newProcess. p - priority:(Processor userSchedulingPriority); - name:'start block handler'; - beGroupLeader; - resume. + priority:(Processor userSchedulingPriority); + name:'start block handler'; + beGroupLeader; + resume. ! ! !Smalltalk class methodsFor:'startup queries'! @@ -4153,7 +4164,7 @@ args := self commandLineArguments. index := args indexOf:aString. (index between:1 and:(args size - 1)) ifTrue:[ - ^ args at:index+1 + ^ args at:index+1 ]. ^ nil. @@ -4458,26 +4469,26 @@ table := IdentityDictionary new:100. Method allSubInstancesDo:[:aMethod | - source := nil. - aMethod sourcePosition notNil ifTrue:[ - aMethod sourceFilename = 'st.src' ifTrue:[ - source := aMethod source. - ] - ] ifFalse:[ - source := aMethod source - ]. - - source notNil ifTrue:[ - pos := newStream position1Based. - newStream nextChunkPut:source. - - " - dont change the methods info - maybe some write error - occurs later, in that case we abort and leave everything - untouched. - " - table at:aMethod put:pos - ] + source := nil. + aMethod sourcePosition notNil ifTrue:[ + aMethod sourceFilename = 'st.src' ifTrue:[ + source := aMethod source. + ] + ] ifFalse:[ + source := aMethod source + ]. + + source notNil ifTrue:[ + pos := newStream position1Based. + newStream nextChunkPut:source. + + " + dont change the methods info - maybe some write error + occurs later, in that case we abort and leave everything + untouched. + " + table at:aMethod put:pos + ] ]. newStream syncData; close. @@ -4492,7 +4503,7 @@ source reference" table keysAndValuesDo:[:aMethod :pos | - aMethod localSourceFilename:fileName position:pos. + aMethod localSourceFilename:fileName position:pos. "/ aMethod printCR. ]. @@ -4520,18 +4531,18 @@ table := IdentityDictionary new:100. Method allSubInstancesDo:[:aMethod | - source := aMethod source. - source notNil ifTrue:[ - pos := newStream position1Based. - newStream nextChunkPut:source. - - " - dont change the methods info - maybe some write error - occurs later, in that case we abort and leave everything - untouched. - " - table at:aMethod put:pos - ] + source := aMethod source. + source notNil ifTrue:[ + pos := newStream position1Based. + newStream nextChunkPut:source. + + " + dont change the methods info - maybe some write error + occurs later, in that case we abort and leave everything + untouched. + " + table at:aMethod put:pos + ] ]. newStream syncData; close. @@ -4546,7 +4557,7 @@ source reference" table keysAndValuesDo:[:aMethod :pos | - aMethod localSourceFilename:fileName position:pos. + aMethod localSourceFilename:fileName position:pos. "/ aMethod printCR. ]. @@ -4565,11 +4576,11 @@ (otherwise, the newest revision will be loaded" ^ self - installAutoloadedClassNamed:clsName - category:cat - package:package - revision:revisionOrNil - numClassInstVars:nil. + installAutoloadedClassNamed:clsName + category:cat + package:package + revision:revisionOrNil + numClassInstVars:nil. ! installAutoloadedClassNamed:clsName category:cat package:package revision:revisionOrNil numClassInstVars:numClassInstVarsOrNil @@ -4584,36 +4595,36 @@ "/ install if not already compiled-in (cls := self at:clsSym) isNil ifTrue:[ - Autoload subclass:clsSym - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:cat - inEnvironment:Smalltalk. - - cls := self at:clsSym. - cls isNil ifTrue:[ - ('Smalltalk [warning]: failed to install ' , clsName , ' as autoloaded.') infoPrintCR. - ] ifFalse:[ - cls package:package asSymbol. - revisionOrNil notNil ifTrue:[ - cls setBinaryRevision:revisionOrNil - ] - ] + Autoload subclass:clsSym + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:cat + inEnvironment:Smalltalk. + + cls := self at:clsSym. + cls isNil ifTrue:[ + ('Smalltalk [warning]: failed to install ' , clsName , ' as autoloaded.') infoPrintCR. + ] ifFalse:[ + cls package:package asSymbol. + revisionOrNil notNil ifTrue:[ + cls setBinaryRevision:revisionOrNil + ] + ] ] ifFalse:[ - "/ class already present - however, if unloaded, check for category/package change - cls isLoaded ifFalse:[ - package ~= cls package ifTrue:[ - cls withoutUpdatingChangesDo:[ - cls package:package asSymbol. - ]. - ]. - cat ~= cls category ifTrue:[ - cls withoutUpdatingChangesDo:[ - cls category:cat. - ]. - ]. - ]. + "/ class already present - however, if unloaded, check for category/package change + cls isLoaded ifFalse:[ + package ~= cls package ifTrue:[ + cls withoutUpdatingChangesDo:[ + cls package:package asSymbol. + ]. + ]. + cat ~= cls category ifTrue:[ + cls withoutUpdatingChangesDo:[ + cls category:cat. + ]. + ]. + ]. ]. ^ cls. @@ -4632,15 +4643,15 @@ "/ along the package-path self packagePath do:[:eachPathComponent | - (dirsConsulted includes:eachPathComponent) ifFalse:[ - self - recursiveInstallAutoloadedClassesFrom:eachPathComponent - rememberIn:dirsConsulted - maxLevels:15 - noAutoload:false - packageTop:eachPathComponent - showSplashInLevels:2. - ] + (dirsConsulted includes:eachPathComponent) ifFalse:[ + self + recursiveInstallAutoloadedClassesFrom:eachPathComponent + rememberIn:dirsConsulted + maxLevels:15 + noAutoload:false + packageTop:eachPathComponent + showSplashInLevels:2. + ] ]. self splashInfo:nil. @@ -4662,16 +4673,16 @@ f isNil ifTrue:[f := self getPackageFileName:anAbbrevFilePath]. f notNil ifTrue:[ - f := f asFilename. - f isDirectory ifTrue:[ - f := f construct:'abbrev.stc' - ]. - [ - s := f readStream. - self installAutoloadedClassesFromStream:s. - s close. - ] on:FileStream openErrorSignal - do:[:ex| "do nothing"]. + f := f asFilename. + f isDirectory ifTrue:[ + f := f construct:'abbrev.stc' + ]. + [ + s := f readStream. + self installAutoloadedClassesFromStream:s. + s close. + ] on:FileStream openErrorSignal + do:[:ex| "do nothing"]. ] " @@ -4690,76 +4701,76 @@ |s2 l abbrevFileName info clsName cls abbrev package cat numClassInstVars words w| anAbbrevFileStream isFileStream ifTrue:[ - abbrevFileName := anAbbrevFileStream pathName. - info := 'declared from: ', abbrevFileName. + abbrevFileName := anAbbrevFileStream pathName. + info := 'declared from: ', abbrevFileName. ]. KnownPackages isNil ifTrue:[ - KnownPackages := Set new. + KnownPackages := Set new. ]. "/ yes, create any required nameSpace, without asking user. Class createNameSpaceQuerySignal answer:true do:[ - [anAbbrevFileStream atEnd] whileFalse:[ - l := anAbbrevFileStream nextLine withoutSeparators. - l notEmpty ifTrue:[ - "/ must do it manually, caring for quoted strings. + [anAbbrevFileStream atEnd] whileFalse:[ + l := anAbbrevFileStream nextLine withoutSeparators. + l notEmpty ifTrue:[ + "/ must do it manually, caring for quoted strings. "/ words := line asCollectionOfWords. - words := OrderedCollection new. - s2 := l readStream. - [s2 atEnd] whileFalse:[ - s2 skipSeparators. - s2 peek == $' ifTrue:[ - s2 next. - w := s2 upTo:$'. - s2 skipSeparators. - ] ifFalse:[ - w := s2 upToSeparator - ]. - words add:w - ]. - words size < 3 ifTrue:[ - 'Smalltalk [warning]: bad abbrev entry' errorPrint. - anAbbrevFileStream isFileStream ifTrue:[ - ' (in ''' errorPrint. - anAbbrevFileStream pathName errorPrint. - ''')' errorPrint - ]. - ': ' errorPrint. l errorPrintCR - ] ifFalse:[ - clsName := (words at:1) asSymbol. - abbrev := (words at:2). - package := (words at:3) asSymbol. - cat := words at:4 ifAbsent:nil. - numClassInstVars := words at:5 ifAbsent:'0'. - numClassInstVars := Integer readFrom:numClassInstVars onError:[0]. + words := OrderedCollection new. + s2 := l readStream. + [s2 atEnd] whileFalse:[ + s2 skipSeparators. + s2 peek == $' ifTrue:[ + s2 next. + w := s2 upTo:$'. + s2 skipSeparators. + ] ifFalse:[ + w := s2 upToSeparator + ]. + words add:w + ]. + words size < 3 ifTrue:[ + 'Smalltalk [warning]: bad abbrev entry' errorPrint. + anAbbrevFileStream isFileStream ifTrue:[ + ' (in ''' errorPrint. + anAbbrevFileStream pathName errorPrint. + ''')' errorPrint + ]. + ': ' errorPrint. l errorPrintCR + ] ifFalse:[ + clsName := (words at:1) asSymbol. + abbrev := (words at:2). + package := (words at:3) asSymbol. + cat := words at:4 ifAbsent:nil. + numClassInstVars := words at:5 ifAbsent:'0'. + numClassInstVars := Integer readFrom:numClassInstVars onError:[0]. "/ KnownPackages add:package. - (cat size == 0) ifTrue:[ - cat := 'autoloaded' - ]. - - "/ on the fly, update the abbreviations - self setFilename:abbrev forClass:clsName package:package. - - "/ ' autoloaded: ' print. clsName print. ' in ' print. cat printCR. - - cls := self - installAutoloadedClassNamed:clsName - category:cat - package:package - revision:nil - numClassInstVars:numClassInstVars. + (cat size == 0) ifTrue:[ + cat := 'autoloaded' + ]. + + "/ on the fly, update the abbreviations + self setFilename:abbrev forClass:clsName package:package. + + "/ ' autoloaded: ' print. clsName print. ' in ' print. cat printCR. + + cls := self + installAutoloadedClassNamed:clsName + category:cat + package:package + revision:nil + numClassInstVars:numClassInstVars. "/ info notNil ifTrue:[ "/ cls setComment:info. "/ ]. - ] - ] - ] + ] + ] + ] ] ! @@ -4776,11 +4787,11 @@ "turn on/off loading of binary objects" aBoolean ifTrue:[ - (ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]) ifTrue:[ - LoadBinaries := true. - ^ self - ]. - 'Smalltalk [info]: this system does not support binary loading' infoPrintCR. + (ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]) ifTrue:[ + LoadBinaries := true. + ^ self + ]. + 'Smalltalk [info]: this system does not support binary loading' infoPrintCR. ]. LoadBinaries := false @@ -4821,14 +4832,14 @@ Experimental and not yet used." Method allSubInstancesDo:[:aMethod | - |newMethod| - - aMethod hasPrimitiveCode ifFalse:[ - newMethod := aMethod asByteCodeMethod. - newMethod ~~ aMethod ifTrue:[ - aMethod becomeSameAs:newMethod - ] - ]. + |newMethod| + + aMethod hasPrimitiveCode ifFalse:[ + newMethod := aMethod asByteCodeMethod. + newMethod ~~ aMethod ifTrue:[ + aMethod becomeSameAs:newMethod + ] + ]. ]. " @@ -4847,9 +4858,9 @@ If a file called NOPACKAGES is found, no further searching is done in that directory or below." self - recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted - maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath - showSplashInLevels:0. + recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted + maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath + showSplashInLevels:0. " Smalltalk installAutoloadedClasses @@ -4871,46 +4882,46 @@ maxLevels == 0 ifTrue:[ "/ 'Smalltalk [warning]: max directory nesting reached.' infoPrintCR. - ^ self + ^ self ]. dir := aDirectory asFilename. dirName := dir pathName. (dirsConsulted includes:dirName) ifTrue:[ - ^ self + ^ self ]. dirsConsulted add:dirName. (dir / 'NOPACKAGES') exists ifTrue:[ - ^ self. + ^ self. ]. (dir / 'NOSUBAUTOLOAD') exists ifTrue:[ - ^ self. + ^ self. ]. noAutoloadHere := noAutoloadIn. noAutoloadHere ifFalse:[ - (dir / 'NOAUTOLOAD') exists ifTrue:[ - noAutoloadHere := true. - ]. + (dir / 'NOAUTOLOAD') exists ifTrue:[ + noAutoloadHere := true. + ]. ] ifTrue:[ - (dir / 'AUTOLOAD') exists ifTrue:[ - noAutoloadHere := false. - ]. + (dir / 'AUTOLOAD') exists ifTrue:[ + noAutoloadHere := false. + ]. ]. ((dir / 'loadAll') exists or:[(dir / 'abbrev.stc') exists]) ifTrue:[ - KnownPackages isNil ifTrue:[ - KnownPackages := Set new. - ]. - pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1. - KnownPackages add:pkgName + KnownPackages isNil ifTrue:[ + KnownPackages := Set new. + ]. + pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1. + KnownPackages add:pkgName ]. showSplashInLevels >= 0 ifTrue:[ - self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...' - bindWith:(dirName contractAtBeginningTo:35)). + self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...' + bindWith:(dirName contractAtBeginningTo:35)). ]. "/ @@ -4918,59 +4929,59 @@ "/ below; however, still traverse the directories to find packages ... "/ noAutoloadHere ifFalse:[ - [ - abbrevStream := (dir / 'abbrev.stc') asFilename readStream. - self installAutoloadedClassesFromStream:abbrevStream. - abbrevStream close. - ] on:FileStream openErrorSignal do:[:ex| "ignore this file"]. + [ + abbrevStream := (dir / 'abbrev.stc') asFilename readStream. + self installAutoloadedClassesFromStream:abbrevStream. + abbrevStream close. + ] on:FileStream openErrorSignal do:[:ex| "ignore this file"]. ]. [ - directoryContents := dir directoryContents asSet. "asSet to speed up remove" + directoryContents := dir directoryContents asSet. "asSet to speed up remove" ] on:FileStream openErrorSignal do:[:ex| - "non-accessable directory: we are done" - ^ self + "non-accessable directory: we are done" + ^ self ]. directoryContents removeAllFoundIn:#( - 'objbc' - 'objvc' - 'doc' - 'CVS' - 'bitmaps' - 'resources' - 'source' - 'not_delivered' - 'not_ported' - ). + 'objbc' + 'objvc' + 'doc' + 'CVS' + 'bitmaps' + 'resources' + 'source' + 'not_delivered' + 'not_ported' + ). dir baseName = 'stx' ifTrue:[ - directoryContents removeAllFoundIn:#( - 'configurations' - 'include' - 'rules' - 'stc' - 'support' - ). + directoryContents removeAllFoundIn:#( + 'configurations' + 'include' + 'rules' + 'stc' + 'support' + ). ]. directoryContents do:[:eachFilenameString | - |f| - - f := dir / eachFilenameString. - f isDirectory ifTrue:[ - self - recursiveInstallAutoloadedClassesFrom:f - rememberIn:dirsConsulted - maxLevels:maxLevels-1 - noAutoload:noAutoloadHere - packageTop:packageTopPath - showSplashInLevels:showSplashInLevels - 1. - ] + |f| + + f := dir / eachFilenameString. + f isDirectory ifTrue:[ + self + recursiveInstallAutoloadedClassesFrom:f + rememberIn:dirsConsulted + maxLevels:maxLevels-1 + noAutoload:noAutoloadHere + packageTop:packageTopPath + showSplashInLevels:showSplashInLevels - 1. + ] ]. showSplashInLevels >= 0 ifTrue:[ - self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...' - bindWith:(dirName contractAtBeginningTo:35)). + self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...' + bindWith:(dirName contractAtBeginningTo:35)). ]. " @@ -4989,15 +5000,15 @@ toAdd := OrderedCollection new. self keysAndValuesDo:[:key :val | - (key == anObject) ifTrue:[ - self shouldImplement. - ]. - (val == anObject ) ifTrue:[ - toAdd add:(key -> newRef) - ]. + (key == anObject) ifTrue:[ + self shouldImplement. + ]. + (val == anObject ) ifTrue:[ + toAdd add:(key -> newRef) + ]. ]. toAdd do:[:each | - self at:(each key) put:(each value) + self at:(each key) put:(each value) ]. ! @@ -5039,10 +5050,10 @@ "read in the named file - look for it in some standard places; return true if ok, false if failed. This method can load almost anything which makes sense: - .st - source files - .cls - binary smalltalk bytecode files - .so - binary compiled machine code class libraries - [.class - java bytecode -- soon to come]" + .st - source files + .cls - binary smalltalk bytecode files + .so - binary compiled machine code class libraries + [.class - java bytecode -- soon to come]" ^ self fileIn:aFileName lazy:nil silent:nil logged:false @@ -5113,10 +5124,10 @@ If silent is true, no compiler messages are output to the transcript. Giving nil for silent/lazy will use the current settings. This method can load almost anything which makes sense: - .st - source files - .cls - binary smalltalk bytecode files - .so - binary compiled machine code class libraries - [.class - java bytecode -- soon to come]" + .st - source files + .cls - binary smalltalk bytecode files + .so - binary compiled machine code class libraries + [.class - java bytecode -- soon to come]" |fileNameString aStream path morePath bos| @@ -5127,42 +5138,42 @@ " (ObjectFileLoader notNil and:[ObjectFileLoader hasValidBinaryExtension:fileNameString]) ifTrue:[ - "/ LoadBinaries ifFalse:[^ false]. - path := self getBinaryFileName:fileNameString. - path isNil ifTrue:[ - path := self getSystemFileName:fileNameString. - ]. - path isNil ifTrue:[^ false]. - ^ (ObjectFileLoader loadObjectFile:path) notNil + "/ LoadBinaries ifFalse:[^ false]. + path := self getBinaryFileName:fileNameString. + path isNil ifTrue:[ + path := self getSystemFileName:fileNameString. + ]. + path isNil ifTrue:[^ false]. + ^ (ObjectFileLoader loadObjectFile:path) notNil ]. (fileNameString asFilename hasSuffix:'cls') ifTrue:[ - BinaryObjectStorage notNil ifTrue:[ - aStream := self systemFileStreamFor:fileNameString. + BinaryObjectStorage notNil ifTrue:[ + aStream := self systemFileStreamFor:fileNameString. "/ path := self getBinaryFileName:fileNameString. "/ path isNil ifTrue:[^ false]. "/ aStream := path asFilename readStream. - aStream notNil ifTrue:[ - aStream binary. - bos := BinaryObjectStorage onOld:aStream. - bos next. - bos close. - ^ true - ]. - ^ false - ] + aStream notNil ifTrue:[ + aStream binary. + bos := BinaryObjectStorage onOld:aStream. + bos next. + bos close. + ^ true + ]. + ^ false + ] ]. aStream := self systemFileStreamFor:fileNameString. aStream isNil ifTrue:[^ false]. (fileNameString includes:$/) ifTrue:[ - "/ temporarily prepend the files directory - "/ to the searchPath. - "/ This allows fileIn-driver files to refer to local - "/ files via a relative path, and drivers to fileIn other - "/ drivers ... - morePath := aStream pathName asFilename directoryName. + "/ temporarily prepend the files directory + "/ to the searchPath. + "/ This allows fileIn-driver files to refer to local + "/ files via a relative path, and drivers to fileIn other + "/ drivers ... + morePath := aStream pathName asFilename directoryName. ]. ^ self fileInStream:aStream lazy:lazy silent:silent logged:logged addPath:morePath @@ -5203,8 +5214,8 @@ "read in the last changes file - bringing the system to the state it had when left the last time. WARNING: this method is rubbish: it should only read things after the - last '**snapshot**' - entry - (instead of the complete changes file)." + last '**snapshot**' - entry + (instead of the complete changes file)." " do NOT update the changes file now ... @@ -5223,11 +5234,11 @@ The file is first searched for using the class name, then the abbreviated name." ^ self - fileInClass:aClassName - package:nil - initialize:true - lazy:false - silent:nil + fileInClass:aClassName + package:nil + initialize:true + lazy:false + silent:nil "Modified: / 9.1.1998 / 14:41:46 / cg" ! @@ -5248,9 +5259,9 @@ (path := self getBinaryFileName:aFileName) isNil ifTrue:[^ false]. ok := (ObjectFileLoader loadClass:aClassName fromObjectFile:path) notNil. ok ifTrue:[ - SilentLoading ifFalse:[ - Transcript show:' loaded ' , aClassName , ' from ' ; showCR:aFileName. - ] + SilentLoading ifFalse:[ + Transcript show:' loaded ' , aClassName , ' from ' ; showCR:aFileName. + ] ]. ^ ok @@ -5269,11 +5280,11 @@ The file is first searched for using the class name, then the abbreviated name." ^ self - fileInClass:aClassName - package:nil - initialize:doInit - lazy:false - silent:nil + fileInClass:aClassName + package:nil + initialize:doInit + lazy:false + silent:nil "Modified: / 9.1.1998 / 14:42:02 / cg" ! @@ -5285,11 +5296,11 @@ The file is first searched for using the class name, then the abbreviated name." ^ self - fileInClass:aClassName - package:nil - initialize:doInit - lazy:loadLazy - silent:nil + fileInClass:aClassName + package:nil + initialize:doInit + lazy:loadLazy + silent:nil "Modified: / 9.1.1998 / 14:42:19 / cg" ! @@ -5305,11 +5316,11 @@ nil uses the value from SilentLoading." ^ self - fileInClass:aClassName - package:nil - initialize:doInit - lazy:loadLazy - silent:beSilent + fileInClass:aClassName + package:nil + initialize:doInit + lazy:loadLazy + silent:beSilent "Modified: / 9.1.1998 / 14:42:28 / cg" ! @@ -5321,11 +5332,11 @@ The file is first searched for using the class name, then the abbreviated name." ^ self - fileInClass:aClassName - package:package - initialize:true - lazy:false - silent:nil + fileInClass:aClassName + package:package + initialize:true + lazy:false + silent:nil "Created: / 08-01-2007 / 10:06:09 / cg" ! @@ -5346,305 +5357,305 @@ wasLazy := Compiler compileLazy:loadLazy. beSilent notNil ifTrue:[ - wasSilent := self silentLoading:beSilent. + wasSilent := self silentLoading:beSilent. ]. classFileName := Smalltalk fileNameForClass:aClassName. (classFileName = aClassName) ifTrue:[ - "/ no abbrev.stc translation for className - (aClassName includes:$:) ifTrue:[ - "/ a nameSpace name - alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1 - ]. + "/ no abbrev.stc translation for className + (aClassName includes:$:) ifTrue:[ + "/ a nameSpace name + alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1 + ]. ]. classFileName asFilename isAbsolute ifTrue:[ - classFileName asFilename suffix notEmptyOrNil ifTrue:[ - ok := self fileIn:classFileName lazy:loadLazy silent:beSilent. - ] ifFalse:[ + classFileName asFilename suffix notEmptyOrNil ifTrue:[ + ok := self fileIn:classFileName lazy:loadLazy silent:beSilent. + ] ifFalse:[ ok := self fileInSourceFile:classFileName lazy:loadLazy silent:beSilent. - ] + ] ] ifFalse:[ - classFileName := classFileName copyReplaceAll:$: with:$_. - [ - Class withoutUpdatingChangesDo:[ - |zarFn zar entry| - - ok := false. - - package notNil ifTrue:[ - packageDir := package asString. - packageDir := packageDir copyReplaceAll:$: with:$/. - ]. - - Class packageQuerySignal answer:package do:[ - " - then, if dynamic linking is available, - " - (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[ - sharedLibExtension := ObjectFileLoader sharedLibraryExtension. - " - first look for a class packages shared binary in binary/xxx.o - " - libName := self libraryFileNameOfClass:aClassName. - libName notNil ifTrue:[ - (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension)) - ifFalse:[ - sharedLibExtension ~= '.o' ifTrue:[ - ok := self fileInClass:aClassName fromObject:(libName, '.o') - ] - ]. - ]. - " - then, look for a shared binary in binary/xxx.o - " - ok ifFalse:[ - (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension)) - ifFalse:[ - sharedLibExtension ~= '.o' ifTrue:[ - ok := self fileInClass:aClassName fromObject:(classFileName, '.o') - ]. - ok ifFalse:[ - alternativeClassFileName notNil ifTrue:[ - (ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension)) - ifFalse:[ - sharedLibExtension ~= '.o' ifTrue:[ - ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o') - ] - ] - ]. - ]. - ]. - ]. - ]. - - " - if that did not work, look for a compiled-bytecode file ... - " - ok ifFalse:[ - (ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ - ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent - ] - ] - ]. - " - if that did not work, and the classes package is known, - look for an st-cls file - in a package subdir of the source-directory ... - " - ok ifFalse:[ - (packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[ - packageFile := self getPackageFileName:(packageDir , '/classes/' , classFileName , '.cls'). - packageFile isNil ifTrue:[ - packageFile := (packageDir , '/classes/' , classFileName , '.cls'). - ]. - (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ - packageFile := self getPackageFileName:(packageDir , '/classes/' , alternativeClassFileName , '.cls'). - packageFile isNil ifTrue:[ - packageFile := (packageDir , '/classes/' , alternativeClassFileName , '.cls'). - ]. - ok := self fileIn:packageFile lazy:loadLazy silent:beSilent - ] - ]. - - zarFn := self getPackageFileName:(packageDir , '/classes.zip'). - zarFn notNil ifTrue:[ - zar := ZipArchive oldFileNamed:zarFn. - zar notNil ifTrue:[ - entry := zar extract:(classFileName , '.cls'). - (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ - entry := zar extract:(alternativeClassFileName , '.cls'). - ]. - entry notNil ifTrue:[ - bos := BinaryObjectStorage onOld:(entry asByteArray readStream). - bos next. - bos close. - ok := true - ]. - ] - ] - ] - ]. - - " - if that did not work, look for an st-source file ... - " - ok ifFalse:[ + classFileName := classFileName copyReplaceAll:$: with:$_. + [ + Class withoutUpdatingChangesDo:[ + |zarFn zar entry| + + ok := false. + + package notNil ifTrue:[ + packageDir := package asString. + packageDir := packageDir copyReplaceAll:$: with:$/. + ]. + + Class packageQuerySignal answer:package do:[ + " + then, if dynamic linking is available, + " + (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[ + sharedLibExtension := ObjectFileLoader sharedLibraryExtension. + " + first look for a class packages shared binary in binary/xxx.o + " + libName := self libraryFileNameOfClass:aClassName. + libName notNil ifTrue:[ + (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension)) + ifFalse:[ + sharedLibExtension ~= '.o' ifTrue:[ + ok := self fileInClass:aClassName fromObject:(libName, '.o') + ] + ]. + ]. + " + then, look for a shared binary in binary/xxx.o + " + ok ifFalse:[ + (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension)) + ifFalse:[ + sharedLibExtension ~= '.o' ifTrue:[ + ok := self fileInClass:aClassName fromObject:(classFileName, '.o') + ]. + ok ifFalse:[ + alternativeClassFileName notNil ifTrue:[ + (ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension)) + ifFalse:[ + sharedLibExtension ~= '.o' ifTrue:[ + ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o') + ] + ] + ]. + ]. + ]. + ]. + ]. + + " + if that did not work, look for a compiled-bytecode file ... + " + ok ifFalse:[ + (ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent) + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ + ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent + ] + ] + ]. + " + if that did not work, and the classes package is known, + look for an st-cls file + in a package subdir of the source-directory ... + " + ok ifFalse:[ + (packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[ + packageFile := self getPackageFileName:(packageDir , '/classes/' , classFileName , '.cls'). + packageFile isNil ifTrue:[ + packageFile := (packageDir , '/classes/' , classFileName , '.cls'). + ]. + (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent) + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ + packageFile := self getPackageFileName:(packageDir , '/classes/' , alternativeClassFileName , '.cls'). + packageFile isNil ifTrue:[ + packageFile := (packageDir , '/classes/' , alternativeClassFileName , '.cls'). + ]. + ok := self fileIn:packageFile lazy:loadLazy silent:beSilent + ] + ]. + + zarFn := self getPackageFileName:(packageDir , '/classes.zip'). + zarFn notNil ifTrue:[ + zar := ZipArchive oldFileNamed:zarFn. + zar notNil ifTrue:[ + entry := zar extract:(classFileName , '.cls'). + (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ + entry := zar extract:(alternativeClassFileName , '.cls'). + ]. + entry notNil ifTrue:[ + bos := BinaryObjectStorage onOld:(entry asByteArray readStream). + bos next. + bos close. + ok := true + ]. + ] + ] + ] + ]. + + " + if that did not work, look for an st-source file ... + " + ok ifFalse:[ filenameToSet := classFileName. (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ filenameToSet := alternativeClassFileName. ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent - ]. - ok ifFalse:[ - " - ... and in the standard source-directory - " + ]. + ok ifFalse:[ + " + ... and in the standard source-directory + " filenameToSet := 'source/' , classFileName. (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ filenameToSet := 'source/' , alternativeClassFileName. ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent - ] - ] - ] - ]. - " - if that did not work, and the classes package is known, - look for an st-source file - in a package subdir of the source-directory ... - " - ok ifFalse:[ - packageDir notNil ifTrue:[ + ] + ] + ] + ]. + " + if that did not work, and the classes package is known, + look for an st-source file + in a package subdir of the source-directory ... + " + ok ifFalse:[ + packageDir notNil ifTrue:[ packageFile := self getPackageSourceFileName:(packageDir , '/source/' , classFileName). - packageFile isNil ifTrue:[ + packageFile isNil ifTrue:[ packageFile := (packageDir , '/source/' , classFileName). - ]. - filenameToSet := packageFile. + ]. + filenameToSet := packageFile. (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ packageFile := self getPackageSourceFileName:(packageDir , '/source/' , alternativeClassFileName). - packageFile isNil ifTrue:[ + packageFile isNil ifTrue:[ packageFile := (packageDir , '/source/' , alternativeClassFileName). - ]. - filenameToSet := packageFile. + ]. + filenameToSet := packageFile. ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent - ]. - ok ifFalse:[ + ]. + ok ifFalse:[ packageFile := self getPackageSourceFileName:(packageDir , '/' , classFileName). - packageFile isNil ifTrue:[ + packageFile isNil ifTrue:[ packageFile := (packageDir , '/' , classFileName). - ]. - filenameToSet := packageFile. + ]. + filenameToSet := packageFile. (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ packageFile := self getPackageFileName:(packageDir , '/' , alternativeClassFileName). - packageFile isNil ifTrue:[ + packageFile isNil ifTrue:[ packageFile := (packageDir , '/' , alternativeClassFileName). - ]. - filenameToSet := packageFile. + ]. + filenameToSet := packageFile. ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent - ]. - ok ifFalse:[ - " - ... and in the standard source-directory - " + ]. + ok ifFalse:[ + " + ... and in the standard source-directory + " filenameToSet := 'source/' , packageDir , '/' , classFileName. (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent) - ifFalse:[ - alternativeClassFileName notNil ifTrue:[ + ifFalse:[ + alternativeClassFileName notNil ifTrue:[ filenameToSet := 'source/' , packageDir , '/' , alternativeClassFileName. ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent - ] - ] - ] - ]. - ]. - ]. - ] - ]. - " - if that did not work, and the classes package is known, - look for a zipArchive containing a class entry. - " - ok ifFalse:[ - packageDir notNil ifTrue:[ - zarFn := self getPackageFileName:(packageDir , '/source.zip'). - zarFn isNil ifTrue:[ - zarFn := packageDir asFilename withSuffix:'zip'. - zarFn := self getSourceFileName:zarFn. - ]. - zarFn notNil ifTrue:[ - zar := ZipArchive oldFileNamed:zarFn. - zar notNil ifTrue:[ - entry := zar extract:(classFileName , '.st'). - (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ - entry := zar extract:(alternativeClassFileName , '.st'). - ]. - entry notNil ifTrue:[ - filenameToSet := zarFn. - ok := self - fileInStream:(entry asString readStream) - lazy:loadLazy - silent:beSilent - logged:false - addPath:nil - ]. - ] - ] - ] - ]. - - " - if that did not work, - look for a zipArchive containing a class entry. - " - ok ifFalse:[ - zarFn := self getSourceFileName:'source.zip'. - zarFn notNil ifTrue:[ - zar := ZipArchive oldFileNamed:zarFn. - zar notNil ifTrue:[ - entry := zar extract:(zarFn := classFileName , '.st'). - (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ - entry := zar extract:(zarFn := alternativeClassFileName , '.st'). - ]. - entry notNil ifTrue:[ - filenameToSet := zarFn. - ok := self - fileInStream:(entry asString readStream) - lazy:loadLazy - silent:beSilent - logged:false - addPath:nil - ]. - ] - ] - ]. - ok ifFalse:[ - " - if there is a sourceCodeManager, ask it for the classes sourceCode - " - (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[ - inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName. - inStream notNil ifTrue:[ - filenameToSet := nil. - ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil. - ] - ]. - ]. - ]. - ] - ]. - ] ensure:[ - Compiler compileLazy:wasLazy. - wasSilent notNil ifTrue:[ - self silentLoading:wasSilent - ] - ]. + ] + ] + ] + ]. + ]. + ]. + ] + ]. + " + if that did not work, and the classes package is known, + look for a zipArchive containing a class entry. + " + ok ifFalse:[ + packageDir notNil ifTrue:[ + zarFn := self getPackageFileName:(packageDir , '/source.zip'). + zarFn isNil ifTrue:[ + zarFn := packageDir asFilename withSuffix:'zip'. + zarFn := self getSourceFileName:zarFn. + ]. + zarFn notNil ifTrue:[ + zar := ZipArchive oldFileNamed:zarFn. + zar notNil ifTrue:[ + entry := zar extract:(classFileName , '.st'). + (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ + entry := zar extract:(alternativeClassFileName , '.st'). + ]. + entry notNil ifTrue:[ + filenameToSet := zarFn. + ok := self + fileInStream:(entry asString readStream) + lazy:loadLazy + silent:beSilent + logged:false + addPath:nil + ]. + ] + ] + ] + ]. + + " + if that did not work, + look for a zipArchive containing a class entry. + " + ok ifFalse:[ + zarFn := self getSourceFileName:'source.zip'. + zarFn notNil ifTrue:[ + zar := ZipArchive oldFileNamed:zarFn. + zar notNil ifTrue:[ + entry := zar extract:(zarFn := classFileName , '.st'). + (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[ + entry := zar extract:(zarFn := alternativeClassFileName , '.st'). + ]. + entry notNil ifTrue:[ + filenameToSet := zarFn. + ok := self + fileInStream:(entry asString readStream) + lazy:loadLazy + silent:beSilent + logged:false + addPath:nil + ]. + ] + ] + ]. + ok ifFalse:[ + " + if there is a sourceCodeManager, ask it for the classes sourceCode + " + (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[ + inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName. + inStream notNil ifTrue:[ + filenameToSet := nil. + ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil. + ] + ]. + ]. + ]. + ] + ]. + ] ensure:[ + Compiler compileLazy:wasLazy. + wasSilent notNil ifTrue:[ + self silentLoading:wasSilent + ] + ]. ]. ok ifTrue:[ - newClass := self at:(aClassName asSymbol). - newClass notNil ifTrue:[ - "set the classes name - but do not change if already set" - filenameToSet notNil ifTrue:[ - newClass getClassFilename isNil ifTrue:[ - newClass setClassFilename:(filenameToSet asFilename baseName) - ]. - ]. - - doInit ifTrue:[ - newClass initialize - ] - ] + newClass := self at:(aClassName asSymbol). + newClass notNil ifTrue:[ + "set the classes name - but do not change if already set" + filenameToSet notNil ifTrue:[ + newClass getClassFilename isNil ifTrue:[ + newClass setClassFilename:(filenameToSet asFilename baseName) + ]. + ]. + + doInit ifTrue:[ + newClass initialize + ] + ] ]. ^ newClass @@ -5659,8 +5670,8 @@ and load it. This install all of its contained classes. Return true if ok, false if not. Notice: the argument may not have an extension (by purpose); - the sharedLib extension (.dll / .so / .sl) is added here, to - make the caller independent of the underlying operatingSystem." + the sharedLib extension (.dll / .so / .sl) is added here, to + make the caller independent of the underlying operatingSystem." |path fn| @@ -5671,7 +5682,7 @@ path := self getBinaryFileName:fn. path isNil ifTrue:[ - path := self getSystemFileName:fn. + path := self getSystemFileName:fn. ]. path isNil ifTrue:[^ false]. @@ -5690,8 +5701,8 @@ and load it. This installs all of its contained classes. Return true if ok, false if not. Notice: the argument may not have an extension (by purpose); - the sharedLib extension (.dll / .so / .sl) is added here, to - make the caller independent of the underlying operatingSystem." + the sharedLib extension (.dll / .so / .sl) is added here, to + make the caller independent of the underlying operatingSystem." |baseName handle libraryFilename packagePath| @@ -5699,21 +5710,21 @@ baseName := aClassLibraryName asFilename withSuffix:(ObjectFileLoader sharedLibrarySuffix). baseName exists ifTrue:[ - "/ load local file first... - handle := ObjectFileLoader loadObjectFile:baseName. + "/ load local file first... + handle := ObjectFileLoader loadObjectFile:baseName. ]. handle isNil ifTrue:[ - packagePath := self getPackageDirectoryForPackage:packageID. - packagePath isNil ifTrue:[^ false]. - packagePath := packagePath asFilename. - libraryFilename := packagePath / baseName. - libraryFilename exists ifFalse:[ - "in windows (with Borland compiler, DLLs in development environment are under objbc" - libraryFilename := packagePath / 'objbc' / baseName. - ]. - libraryFilename exists ifTrue:[ - handle := ObjectFileLoader loadObjectFile:libraryFilename pathName. - ]. + packagePath := self getPackageDirectoryForPackage:packageID. + packagePath isNil ifTrue:[^ false]. + packagePath := packagePath asFilename. + libraryFilename := packagePath / baseName. + libraryFilename exists ifFalse:[ + "in windows (with Borland compiler, DLLs in development environment are under objbc" + libraryFilename := packagePath / 'objbc' / baseName. + ]. + libraryFilename exists ifTrue:[ + handle := ObjectFileLoader loadObjectFile:libraryFilename pathName. + ]. ]. "/ handle notNil ifTrue:[ @@ -5769,40 +5780,40 @@ inStream := streamArg. inStream isNil ifTrue:[^ false]. inStream := EncodedStream isNil - ifTrue:[ inStream ] - ifFalse:[ EncodedStream decodedStreamFor:inStream ]. + ifTrue:[ inStream ] + ifFalse:[ EncodedStream decodedStreamFor:inStream ]. lazy notNil ifTrue:[wasLazy := Compiler compileLazy:lazy]. silent notNil ifTrue:[wasSilent := self silentLoading:silent]. morePath notNil ifTrue:[ - oldSystemPath := SystemPath copy. - SystemPath addFirst:morePath. - oldRealPath := RealSystemPath. - RealSystemPath := nil. + oldSystemPath := SystemPath copy. + SystemPath addFirst:morePath. + oldRealPath := RealSystemPath. + RealSystemPath := nil. ]. [ - (Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal) answer:logged do:[ + (Class updateChangeFileQuerySignal , Class updateChangeListQuerySignal) answer:logged do:[ "JV: Changed to give ProgrammingLanguage to choose proper reader" (ProgrammingLanguage forStream: inStream) fileInStream: inStream - ] + ] ] ensure:[ - morePath notNil ifTrue:[ - "take care, someone could have changed SystemPath during fileIn!!" - (SystemPath copyFrom:2) = oldSystemPath ifTrue:[ - SystemPath := oldSystemPath. - RealSystemPath := oldRealPath. - ] ifFalse:[ - (oldSystemPath includes:morePath) ifFalse:[ - SystemPath remove:morePath ifAbsent:[]. - ]. - RealSystemPath := nil. - ]. - ]. - lazy notNil ifTrue:[Compiler compileLazy:wasLazy]. - silent notNil ifTrue:[self silentLoading:wasSilent]. - inStream close + morePath notNil ifTrue:[ + "take care, someone could have changed SystemPath during fileIn!!" + (SystemPath copyFrom:2) = oldSystemPath ifTrue:[ + SystemPath := oldSystemPath. + RealSystemPath := oldRealPath. + ] ifFalse:[ + (oldSystemPath includes:morePath) ifFalse:[ + SystemPath remove:morePath ifAbsent:[]. + ]. + RealSystemPath := nil. + ]. + ]. + lazy notNil ifTrue:[Compiler compileLazy:wasLazy]. + silent notNil ifTrue:[self silentLoading:wasSilent]. + inStream close ]. ^ true @@ -5818,14 +5829,14 @@ "return true, if a particular class library is already loaded" ObjectMemory - binaryModuleInfo - do:[:entry | - entry type == #classLibrary ifTrue:[ - entry libraryName = name ifTrue:[ - ^ true "/ already loaded - ] - ]. - ]. + binaryModuleInfo + do:[:entry | + entry type == #classLibrary ifTrue:[ + entry libraryName = name ifTrue:[ + ^ true "/ already loaded + ] + ]. + ]. ^ false @@ -5858,20 +5869,20 @@ "Modified: 31.10.1996 / 16:57:24 / cg" ! -secureFileIn:aFileName +secureFileIn:aFileName "read in the named file, looking for it at standard places. - Catch various errors during fileIn. + Catch various errors during fileIn. Return true if ok, false if failed" - + |retVal| retVal := false. - (SignalSet - with:AbortOperationRequest - with:TerminateProcessRequest - with:Parser parseErrorSignal) - handle:[:ex | ex return ] - do:[ retVal := self fileIn:aFileName ]. + (SignalSet + with:AbortOperationRequest + with:TerminateProcessRequest + with:Parser parseErrorSignal) + handle:[:ex | ex return ] + do:[ retVal := self fileIn:aFileName ]. ^ retVal ! @@ -5883,9 +5894,9 @@ wasSilent := self silentLoading:true. [ - self fileIn:aFilename + self fileIn:aFilename ] ensure:[ - self silentLoading:wasSilent + self silentLoading:wasSilent ] ! ! @@ -5901,7 +5912,7 @@ aString := self getBitmapFileName:aFileName. aString notNil ifTrue:[ - ^ aString asFilename readStreamOrNil + ^ aString asFilename readStreamOrNil ]. ^ nil ! @@ -5943,9 +5954,9 @@ |fn| (aFileName asFilename hasSuffix:'st') ifTrue:[ - fn := aFileName copyWithoutLast:3 + fn := aFileName copyWithoutLast:3 ] ifFalse:[ - fn := aFileName + fn := aFileName ]. ^ self filenameAbbreviations keyAtEqualValue:fn ifAbsent:[fn]. @@ -5964,11 +5975,11 @@ return a collection of pathes which include that directory." ^ self realSystemPath select:[:dirName | - |fullPath| - - fullPath := dirName asFilename construct:aDirectoryName. - "/ fullPath exists and:[fullPath isDirectory and:[fullPath isReadable]] - fullPath isDirectory and:[fullPath isReadable] + |fullPath| + + fullPath := dirName asFilename construct:aDirectoryName. + "/ fullPath exists and:[fullPath isDirectory and:[fullPath isReadable]] + fullPath isDirectory and:[fullPath isReadable] ]. ! @@ -5982,7 +5993,7 @@ aString := self getFileInFileName:aFileName. aString notNil ifTrue:[ - ^ aString asFilename readStreamOrNil + ^ aString asFilename readStreamOrNil ]. ^ nil ! @@ -5995,8 +6006,8 @@ "/ This was added as an extension of libsvn - should be no longer needed "/ compatQuery := Smalltalk classNamed: 'SVN::CompatModeQuery'. -"/ (compatQuery notNil -"/ and:[compatQuery isLoaded +"/ (compatQuery notNil +"/ and:[compatQuery isLoaded "/ and:[compatQuery query not]]) ifTrue:[ "/ nm := aClassOrClassName isBehavior "/ ifTrue:[aClassOrClassName name] @@ -6006,39 +6017,39 @@ "/ ]. aClassOrClassName isBehavior ifTrue:[ - cls := aClassOrClassName. + cls := aClassOrClassName. ] ifFalse:[ - cls := Smalltalk classNamed:aClassOrClassName. - cls isNil ifTrue:[ - nameWithPrefix := aClassOrClassName. - nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1). - ]. + cls := Smalltalk classNamed:aClassOrClassName. + cls isNil ifTrue:[ + nameWithPrefix := aClassOrClassName. + nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1). + ]. ]. cls notNil ifTrue:[ - nonMetaclass := cls theNonMetaclass. - nm := nonMetaclass getClassFilename. - nm isNil ifTrue:[ - cls revisionInfo notNil ifTrue:[ - nm := cls revisionInfo fileName. - ]. - ]. - nm notNil ifTrue:[ - ^ nm asFilename withoutSuffix baseName - ]. - nameWithPrefix := nonMetaclass name. - nameWithoutPrefix := nonMetaclass nameWithoutPrefix. + nonMetaclass := cls theNonMetaclass. + nm := nonMetaclass getClassFilename. + nm isNil ifTrue:[ + cls revisionInfo notNil ifTrue:[ + nm := cls revisionInfo fileName. + ]. + ]. + nm notNil ifTrue:[ + ^ nm asFilename withoutSuffix baseName + ]. + nameWithPrefix := nonMetaclass name. + nameWithoutPrefix := nonMetaclass nameWithoutPrefix. ]. CachedAbbreviations notNil ifTrue:[ - nameWithPrefix := nameWithPrefix asSymbol. - (CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[ - ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName - ]. - nameWithoutPrefix := nameWithoutPrefix asSymbol. - (CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[ - ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName - ]. + nameWithPrefix := nameWithPrefix asSymbol. + (CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[ + ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName + ]. + nameWithoutPrefix := nameWithoutPrefix asSymbol. + (CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[ + ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName + ]. ]. ^ nameWithPrefix copyReplaceAll:$: with:$_ @@ -6066,7 +6077,7 @@ to 14 chars)" CachedAbbreviations isNil ifTrue:[ - self readAbbreviations + self readAbbreviations ]. ^ CachedAbbreviations @@ -6103,7 +6114,7 @@ return the absolute filename or nil if none is found." BinaryPath isNil ifTrue:[ - BinaryPath := self constructPathFor:BinaryDirName + BinaryPath := self constructPathFor:BinaryDirName ]. ^ self searchPath:BinaryPath for:aFileName in:BinaryDirName @@ -6133,56 +6144,56 @@ then in the package directory if existing. Return a path or nil. Search order is: - bitmaps//file - resources//bitmaps/file - /bitmaps/file + bitmaps//file + resources//bitmaps/file + /bitmaps/file " |f dir packageDir pF| ((f := aFileName asString) startsWith:'bitmaps/') ifTrue:[ - f := f copyFrom:('bitmaps/' size + 1). + f := f copyFrom:('bitmaps/' size + 1). ]. aPackageIDOrNil isNil ifTrue:[ - "/ this will be an error in the future + "/ this will be an error in the future "/ 'Smalltalk [warning]: bitmap file access without package: ' infoPrint. aFileName infoPrintCR. "/ self halt. - pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps'). - pF notNil ifTrue:[ - ^ pF. - ]. - f ~= aFileName ifTrue:[ - pF := self searchPath:(self realSystemPath) for:f in:('bitmaps'). - pF notNil ifTrue:[ - ^ pF. - ]. - ]. - ^ nil + pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps'). + pF notNil ifTrue:[ + ^ pF. + ]. + f ~= aFileName ifTrue:[ + pF := self searchPath:(self realSystemPath) for:f in:('bitmaps'). + pF notNil ifTrue:[ + ^ pF. + ]. + ]. + ^ nil ]. dir := self projectDirectoryForPackage:aPackageIDOrNil. dir notNil ifTrue:[ - pF := dir asFilename / f. - pF exists ifTrue:[ - ^ pF. - ]. - pF := dir asFilename / 'bitmaps' /f. - pF exists ifTrue:[ - ^ pF. - ]. + pF := dir asFilename / f. + pF exists ifTrue:[ + ^ pF. + ]. + pF := dir asFilename / 'bitmaps' /f. + pF exists ifTrue:[ + ^ pF. + ]. ]. packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/. pF := self searchPath:(self realSystemPath) for:aFileName in:('bitmaps/',packageDir). pF notNil ifTrue:[ - ^ pF. + ^ pF. ]. pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir,'/bitmaps'). pF notNil ifTrue:[ - ^ pF. + ^ pF. ]. ^ nil @@ -6204,7 +6215,7 @@ return the absolute filename or nil if none is found." FileInPath isNil ifTrue:[ - FileInPath := self constructPathFor:FileInDirName + FileInPath := self constructPathFor:FileInDirName ]. ^ self searchPath:FileInPath for:aFileName in:FileInDirName @@ -6222,22 +6233,22 @@ packageSubDirectory := aPackageID asPackageId directory. checkForPackageDirectory := - [:moduleDir | - |packageDir| - - moduleDir isDirectory ifTrue:[ - packageDir := moduleDir / packageSubDirectory. - packageDir isDirectory ifTrue:[ - ^ packageDir - ] - ]. - ]. + [:moduleDir | + |packageDir| + + moduleDir isDirectory ifTrue:[ + packageDir := moduleDir / packageSubDirectory. + packageDir isDirectory ifTrue:[ + ^ packageDir + ] + ]. + ]. self packagePath do:[:aPath | - |moduleDir| - - moduleDir := aPath asFilename / module. - checkForPackageDirectory value:moduleDir. + |moduleDir| + + moduleDir := aPath asFilename / module. + checkForPackageDirectory value:moduleDir. ]. ^ nil @@ -6261,20 +6272,20 @@ "/ search along packagePath ... f := self searchPath:self packagePath for:aFileName in:nil. f isNil ifTrue:[ - "/ search under packages-directory along systemPath ... - f := self searchPath:self realSystemPath for:aFileName in:PackageDirName. - "/ kludge - allow for stx-directory to be named differently - f isNil ifTrue:[ - (aFileName startsWith:('stx' , Filename separator)) ifTrue:[ - f := '../..' asFilename / (aFileName copyFrom:5). - f exists ifTrue:[ - ^ f pathName - ]. - ] - ]. + "/ search under packages-directory along systemPath ... + f := self searchPath:self realSystemPath for:aFileName in:PackageDirName. + "/ kludge - allow for stx-directory to be named differently + f isNil ifTrue:[ + (aFileName startsWith:('stx' , Filename separator)) ifTrue:[ + f := '../..' asFilename / (aFileName copyFrom:5). + f exists ifTrue:[ + ^ f pathName + ]. + ] + ]. ]. (f notNil and:[(f := f asFilename) exists]) ifTrue:[ - ^ f pathName + ^ f pathName ]. ^ nil @@ -6323,12 +6334,12 @@ |pkgOrNil| aClassOrNil notNil ifTrue:[ - pkgOrNil := aClassOrNil package. + pkgOrNil := aClassOrNil package. ]. ^ self getResourceFileName:aFileName forPackage:pkgOrNil. " - Smalltalk getResourceFileName:'de.rs' forClass:SystemBrowser + Smalltalk getResourceFileName:'de.rs' forClass:SystemBrowser " ! @@ -6338,59 +6349,59 @@ and in a packages directory. Return the absolute filename or nil if none is found. Search order is: - resources//file - /resources/file + resources//file + /resources/file " |pF f dir packageDir| ((f := aFileName asString) startsWith:'resources/') ifTrue:[ - f := aFileName copyFrom:('resources/' size + 1). + f := aFileName copyFrom:('resources/' size + 1). ]. aPackageIDOrNil isNil ifTrue:[ - "/ this will be an error in the future + "/ this will be an error in the future "/ 'Smalltalk [warning]: resource file access without package: ' infoPrint. aFileName infoPrintCR. "/ self halt. - pF := self searchPath:(self realSystemPath) for:aFileName in:('resources'). - pF notNil ifTrue:[ - ^ pF. - ]. + pF := self searchPath:(self realSystemPath) for:aFileName in:('resources'). + pF notNil ifTrue:[ + ^ pF. + ]. "/ pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/styles'). "/ pF notNil ifTrue:[ "/ ^ pF. "/ ]. - f ~= aFileName ifTrue:[ - pF := self searchPath:(self realSystemPath) for:f in:('resources'). - pF notNil ifTrue:[ - ^ pF. - ]. + f ~= aFileName ifTrue:[ + pF := self searchPath:(self realSystemPath) for:f in:('resources'). + pF notNil ifTrue:[ + ^ pF. + ]. "/ pF := self searchPath:(self realSystemPath) for:f in:('resources/styles'). "/ pF notNil ifTrue:[ "/ ^ pF. "/ ]. - ]. - ^ nil + ]. + ^ nil ]. packageDir := aPackageIDOrNil copyReplaceAll:$: with:$/. pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/',packageDir). pF notNil ifTrue:[ - ^ pF. + ^ pF. ]. "/ the following code finds the file within the IDE's own hierarchy dir := self projectDirectoryForPackage:aPackageIDOrNil. dir notNil ifTrue:[ - dir := dir asFilename. - - (pF := dir / 'resources' / f) exists ifTrue:[ ^ pF name ]. + dir := dir asFilename. + + (pF := dir / 'resources' / f) exists ifTrue:[ ^ pF name ]. "/ (pF := dir / 'styles' / f) exists ifTrue:[ ^ pF name ]. - "resolve something like: 'ASN/definition.asn1'" - (pF := dir / f) exists ifTrue:[ ^ pF name ]. + "resolve something like: 'ASN/definition.asn1'" + (pF := dir / f) exists ifTrue:[ ^ pF name ]. ]. ^ nil @@ -6399,7 +6410,7 @@ Smalltalk getResourceFileName:'SystemBrowser.rs' forPackage:'stx:libtool' Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview' Smalltalk getResourceFileName:'styles/normal.style' forPackage:'stx:libview' - Smalltalk getResourceFileName:'styles/mswindowsXP.style' forPackage:'stx:libview' + Smalltalk getResourceFileName:'styles/mswindowsXP.style' forPackage:'stx:libview' Smalltalk getResourceFileName:'Foo.rs' forPackage:'stx:libview' " @@ -6416,16 +6427,16 @@ |f| SourcePath isNil ifTrue:[ - SourcePath := self constructPathFor:SourceDirName + SourcePath := self constructPathFor:SourceDirName ]. "/ first, try a source subdir along the path. SourcePath notNil ifTrue:[ - f := self searchPath:SourcePath for:aFileName in:SourceDirName. + f := self searchPath:SourcePath for:aFileName in:SourceDirName. ]. f isNil ifTrue:[ - "/ then, try it itself along the path. - f := self searchPath:self realSystemPath for:aFileName in:nil + "/ then, try it itself along the path. + f := self searchPath:self realSystemPath for:aFileName in:nil ]. ^ f @@ -6452,23 +6463,23 @@ fn := aFileNameOrString asFilename. nameString := fn name. fn isAbsolute ifTrue:[ - "dont use path for absolute file names" - - ^ nameString + "dont use path for absolute file names" + + ^ nameString ]. self realSystemPath do:[:dirName | - |realName| - - realName := dirName asFilename / nameString. - "/ - "/ here, we also return true if its a directory - "/ (Even if unreadable). - "/ It could be that the file itself is still readable. - "/ - (realName isDirectory or:[realName isReadable]) ifTrue: [ - ^ realName name - ] + |realName| + + realName := dirName asFilename / nameString. + "/ + "/ here, we also return true if its a directory + "/ (Even if unreadable). + "/ It could be that the file itself is still readable. + "/ + (realName isDirectory or:[realName isReadable]) ifTrue: [ + ^ realName name + ] ]. ^ nil @@ -6494,10 +6505,10 @@ classPackage := aClass package. img := self imageFromFileNamed:aFileName inPackage:classPackage. img isNil ifTrue:[ - "/ try under the goodies package ... - classPackage ~= 'stx:goodies' ifTrue:[ - img := self imageFromFileNamed:aFileName inPackage:'stx:goodies'. - ] + "/ try under the goodies package ... + classPackage ~= 'stx:goodies' ifTrue:[ + img := self imageFromFileNamed:aFileName inPackage:'stx:goodies'. + ] ]. ^ img @@ -6512,16 +6523,16 @@ then in the package directory if existing. Return an image or nil. Search order is: - bitmaps//file - resources//bitmaps/file - /bitmaps/file + bitmaps//file + resources//bitmaps/file + /bitmaps/file " |path| path := self getBitmapFileName:aFileName forPackage:aPackage. path notNil ifTrue:[ - ^ Image fromFile:path. + ^ Image fromFile:path. ]. ^ nil @@ -6553,9 +6564,9 @@ |aStream line words n aClassName| aClassOrClassName isBehavior ifTrue:[ - aClassName := aClassOrClassName name + aClassName := aClassOrClassName name ] ifFalse:[ - aClassName := aClassOrClassName + aClassName := aClassOrClassName ]. aClassName := aClassName asString. @@ -6563,26 +6574,26 @@ with:#(2) "/ column do:[:fileName :col | - aStream := self systemFileStreamFor:fileName. - aStream notNil ifTrue:[ - [aStream atEnd] whileFalse:[ - line := aStream nextLine. - line notNil ifTrue:[ - (line startsWith:'#') ifFalse:[ - words := line asCollectionOfWords. - (n := words size) > 1 ifTrue:[ - (words at:1) = aClassName ifTrue:[ - n >= col ifTrue:[ - aStream close. - ^ (words at:col) withoutSeparators - ] - ] - ] - ] - ] - ]. - aStream close - ]. + aStream := self systemFileStreamFor:fileName. + aStream notNil ifTrue:[ + [aStream atEnd] whileFalse:[ + line := aStream nextLine. + line notNil ifTrue:[ + (line startsWith:'#') ifFalse:[ + words := line asCollectionOfWords. + (n := words size) > 1 ifTrue:[ + (words at:1) = aClassName ifTrue:[ + n >= col ifTrue:[ + aStream close. + ^ (words at:col) withoutSeparators + ] + ] + ] + ] + ] + ]. + aStream close + ]. ]. ^ nil @@ -6651,10 +6662,10 @@ "/ in the directory, from which the project was loaded prj := Project projectWithId:aPackage. prj notNil ifTrue:[ - prjDir := prj directory. + prjDir := prj directory. ]. (prjDir notNil and:[prjDir asFilename exists]) ifFalse:[ - prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/). + prjDir := Smalltalk getPackageFileName:(aPackage copyReplaceAll:$: with:$/). ]. ^ prjDir @@ -6690,10 +6701,10 @@ sigh - all for those poor sys5.3 or MSDOS people with short filenames ..." self - withAbbreviationsFromStream:aStream - do:[:className :abbrev :pkg | - self setFilename:abbrev forClass:className package:pkg. - ]. + withAbbreviationsFromStream:aStream + do:[:className :abbrev :pkg | + self setFilename:abbrev forClass:className package:pkg. + ]. "Modified: / 13.12.1999 / 11:54:17 / cg" ! @@ -6705,35 +6716,35 @@ |nP| RealSystemPath isNil ifTrue:[ - OperatingSystem isVMSlike ifTrue:[ - "/ temporary kludge: since we cannot currently - "/ check for existance of a name like 'volume:', - "/ leave those in the Path without a check. - RealSystemPath := SystemPath select:[:dirName | |f| - f := dirName asFilename. - f isVolumeOnly or:[(f isDirectory) and:[f isReadable]] - ] - ] ifFalse:[ - RealSystemPath := SystemPath - select:[:eachDirectoryName | |f| - f := eachDirectoryName asFilename. - (f isDirectory) and:[f isReadable] - ] thenCollect:[:eachDirectoryName| - eachDirectoryName asFilename pathName. - ]. - - "/ remove duplicates (but keep order) - nP := OrderedCollection new. - RealSystemPath do:[:p | - (nP includes:p) ifFalse:[ - nP add:p - ] - ]. - (nP includes:'.') ifFalse:[ - nP add:'.' - ]. - RealSystemPath := nP. - ]. + OperatingSystem isVMSlike ifTrue:[ + "/ temporary kludge: since we cannot currently + "/ check for existance of a name like 'volume:', + "/ leave those in the Path without a check. + RealSystemPath := SystemPath select:[:dirName | |f| + f := dirName asFilename. + f isVolumeOnly or:[(f isDirectory) and:[f isReadable]] + ] + ] ifFalse:[ + RealSystemPath := SystemPath + select:[:eachDirectoryName | |f| + f := eachDirectoryName asFilename. + (f isDirectory) and:[f isReadable] + ] thenCollect:[:eachDirectoryName| + eachDirectoryName asFilename pathName. + ]. + + "/ remove duplicates (but keep order) + nP := OrderedCollection new. + RealSystemPath do:[:p | + (nP includes:p) ifFalse:[ + nP add:p + ] + ]. + (nP includes:'.') ifFalse:[ + nP add:'.' + ]. + RealSystemPath := nP. + ]. ]. ^ RealSystemPath ! @@ -6749,40 +6760,40 @@ maxLevels == 0 ifTrue:[ "/ 'Smalltalk [warning]: max directory nesting reached.' infoPrintCR. - ^ self + ^ self ]. dir := aDirectory asFilename. dir exists ifFalse:[^ self]. [ - abbrevStream := (dir / 'abbrev.stc') asFilename readStream. - self readAbbreviationsFromStream:abbrevStream. - abbrevStream close. + abbrevStream := (dir / 'abbrev.stc') asFilename readStream. + self readAbbreviationsFromStream:abbrevStream. + abbrevStream close. ] on:FileStream openErrorSignal do:[:ex| "ignore this file"]. [ - directoryContents := dir directoryContents. + directoryContents := dir directoryContents. ] on:FileStream openErrorSignal do:[:ex| - "non-accessable directory: we are done" - ^ self + "non-accessable directory: we are done" + ^ self ]. directoryContents do:[:aFilename | - |f| - - (#( - 'doc' - 'CVS' - 'bitmaps' - 'resources' - 'source' - ) includes:aFilename) ifFalse:[ - f := dir / aFilename. - f isDirectory ifTrue:[ - self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1 - ] - ]. + |f| + + (#( + 'doc' + 'CVS' + 'bitmaps' + 'resources' + 'source' + ) includes:aFilename) ifFalse:[ + f := dir / aFilename. + f isDirectory ifTrue:[ + self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1 + ] + ]. ]. ! @@ -6793,17 +6804,17 @@ |prjDir rsrcDir| aPackage notNil ifTrue:[ - prjDir := self projectDirectoryForPackage:aPackage. - - (prjDir notNil - and:[(prjDir := prjDir asFilename) exists - and:[(rsrcDir := prjDir / 'resources') exists]]) ifTrue:[ - ^ rsrcDir - ]. - rsrcDir := self getSystemFileName:('resources/' , (aPackage copyReplaceAll:$: with:$/)). - rsrcDir notNil ifTrue:[ - ^ rsrcDir asFilename - ]. + prjDir := self projectDirectoryForPackage:aPackage. + + (prjDir notNil + and:[(prjDir := prjDir asFilename) exists + and:[(rsrcDir := prjDir / 'resources') exists]]) ifTrue:[ + ^ rsrcDir + ]. + rsrcDir := self getSystemFileName:('resources/' , (aPackage copyReplaceAll:$: with:$/)). + rsrcDir notNil ifTrue:[ + ^ rsrcDir asFilename + ]. ]. ^ nil @@ -6832,7 +6843,7 @@ aString := self getResourceFileName:aFileName forClass:aClassOrNil. aString notNil ifTrue:[ - ^ aString asFilename readStreamOrNil + ^ aString asFilename readStreamOrNil ]. ^ nil ! @@ -6845,26 +6856,26 @@ ((f := aFileName asFilename) isAbsolute or:[f isExplicitRelative]) ifTrue:[ - "/ - "/ dont use path for absolute or explicit .-relative file names - "/ - ^ aFileName + "/ + "/ dont use path for absolute or explicit .-relative file names + "/ + ^ aFileName ]. aPath notNil ifTrue:[ - aPath do:[:dirName | - |realName dir| - - dir := dirName asFilename. - aDirName notNil ifTrue:[ - realName := dir / aDirName / aFileName. - ] ifFalse:[ - realName := dir / aFileName. - ]. - (realName isReadable) ifTrue:[ - ^ realName name - ] - ]. + aPath do:[:dirName | + |realName dir| + + dir := dirName asFilename. + aDirName notNil ifTrue:[ + realName := dir / aDirName / aFileName. + ] ifFalse:[ + realName := dir / aFileName. + ]. + (realName isReadable) ifTrue:[ + ^ realName name + ] + ]. ]. "/ not needed - executing dir is always in SearchPath @@ -6881,55 +6892,55 @@ |classNameSymbol oldAbbrev oldPath newPath cls abbrevs| CachedAbbreviations isNil ifTrue:[ - CachedAbbreviations := IdentityDictionary new. + CachedAbbreviations := IdentityDictionary new. ]. abbrevs := CachedAbbreviations. aClassNameString ~= aFileNameString ifTrue:[ - classNameSymbol := aClassNameString asSymbol. - oldAbbrev := abbrevs at:classNameSymbol ifAbsent:nil. - oldAbbrev notNil ifTrue:[ - oldAbbrev ~= aFileNameString ifTrue:[ - oldAbbrev asFilename isAbsolute - ifTrue:[ oldPath := oldAbbrev ] - ifFalse:[ oldPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: oldAbbrev ]. - aFileNameString asFilename isAbsolute - ifTrue:[ newPath := aFileNameString ] - ifFalse:[ newPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: aFileNameString ]. - - oldPath ~= newPath ifTrue:[ - StandAlone ifFalse:[ - ('Smalltalk [warning]: autoload path change for: ',aClassNameString,' in package ',aPackageNameString) infoPrintCR. - ('Smalltalk [info]: old: ',oldPath) infoPrintCR. - ('Smalltalk [info]: new: ',newPath) infoPrintCR. - ] - ] - ]. - "overwrite old abbreviation with new one, - to allow fixing of bad abbrev files" - ]. - - cls := self classNamed:aFileNameString. - cls notNil ifTrue:[ - cls name ~= aClassNameString ifTrue:[ - "/ ok, there is a class named after this abbrev ... - "/ this is only a conflict, if the other class has no - "/ abbreviation (or the same). - (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = aFileNameString ifTrue:[ - cls isNameSpace ifFalse:[ - aPackageNameString = cls package ifTrue:[ - StandAlone ifFalse:[ - ('Smalltalk [warning]: conflict for: ' , cls name , - ' in package ' , aPackageNameString) infoPrintCR. - ('Smalltalk [warning]: (' , aClassNameString , ' -> ' , aFileNameString - , ')') infoPrintCR - ] - ] - ] - ] - ] - ]. - abbrevs at:classNameSymbol put:aFileNameString. + classNameSymbol := aClassNameString asSymbol. + oldAbbrev := abbrevs at:classNameSymbol ifAbsent:nil. + oldAbbrev notNil ifTrue:[ + oldAbbrev ~= aFileNameString ifTrue:[ + oldAbbrev asFilename isAbsolute + ifTrue:[ oldPath := oldAbbrev ] + ifFalse:[ oldPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: oldAbbrev ]. + aFileNameString asFilename isAbsolute + ifTrue:[ newPath := aFileNameString ] + ifFalse:[ newPath := (self projectDirectoryForPackage:aPackageNameString) asFilename constructString: aFileNameString ]. + + oldPath ~= newPath ifTrue:[ + StandAlone ifFalse:[ + ('Smalltalk [warning]: autoload path change for: ',aClassNameString,' in package ',aPackageNameString) infoPrintCR. + ('Smalltalk [info]: old: ',oldPath) infoPrintCR. + ('Smalltalk [info]: new: ',newPath) infoPrintCR. + ] + ] + ]. + "overwrite old abbreviation with new one, + to allow fixing of bad abbrev files" + ]. + + cls := self classNamed:aFileNameString. + cls notNil ifTrue:[ + cls name ~= aClassNameString ifTrue:[ + "/ ok, there is a class named after this abbrev ... + "/ this is only a conflict, if the other class has no + "/ abbreviation (or the same). + (abbrevs at:(cls name asSymbol) ifAbsent:cls name) = aFileNameString ifTrue:[ + cls isNameSpace ifFalse:[ + aPackageNameString = cls package ifTrue:[ + StandAlone ifFalse:[ + ('Smalltalk [warning]: conflict for: ' , cls name , + ' in package ' , aPackageNameString) infoPrintCR. + ('Smalltalk [warning]: (' , aClassNameString , ' -> ' , aFileNameString + , ')') infoPrintCR + ] + ] + ] + ] + ] + ]. + abbrevs at:classNameSymbol put:aFileNameString. ] ! @@ -6944,9 +6955,9 @@ |aStream line words n aClassName| aClassOrClassName isBehavior ifTrue:[ - aClassName := aClassOrClassName name + aClassName := aClassOrClassName name ] ifFalse:[ - aClassName := aClassOrClassName + aClassName := aClassOrClassName ]. aClassName := aClassName asString. @@ -6954,26 +6965,26 @@ with:#(3 2) "/ column do:[:fileName :col | - aStream := self systemFileStreamFor:fileName. - aStream notNil ifTrue:[ - [aStream atEnd] whileFalse:[ - line := aStream nextLine. - line notNil ifTrue:[ - (line startsWith:'#') ifFalse:[ - words := line asCollectionOfWords. - (n := words size) > 1 ifTrue:[ - (words at:1) = aClassName ifTrue:[ - n >= col ifTrue:[ - aStream close. - ^ (words at:col) withoutSeparators - ] - ] - ] - ] - ] - ]. - aStream close - ]. + aStream := self systemFileStreamFor:fileName. + aStream notNil ifTrue:[ + [aStream atEnd] whileFalse:[ + line := aStream nextLine. + line notNil ifTrue:[ + (line startsWith:'#') ifFalse:[ + words := line asCollectionOfWords. + (n := words size) > 1 ifTrue:[ + (words at:1) = aClassName ifTrue:[ + n >= col ifTrue:[ + aStream close. + ^ (words at:col) withoutSeparators + ] + ] + ] + ] + ] + ]. + aStream close + ]. ]. ^ nil @@ -6999,7 +7010,7 @@ aString := self getSourceFileName:aFileName. aString notNil ifTrue:[ - ^ aString asFilename readStreamOrNil + ^ aString asFilename readStreamOrNil ]. ^ nil ! @@ -7013,7 +7024,7 @@ aString := self getSystemFileName:aFileName. aString notNil ifTrue:[ - ^ aString asFilename readStreamOrNil + ^ aString asFilename readStreamOrNil ]. ^ nil ! @@ -7050,38 +7061,38 @@ withAbbreviationsFromStream:aStream do:aBlock "read classname to filename mappings from aStream. Evaluate aBlock for each tuple: - class-name , abbrev-name, package + class-name , abbrev-name, package Sigh - all for those poor sys5.3 or MSDOS people with short filenames..." |line lineNo words nm abbrev pkg category size s w| lineNo := 0. [aStream atEnd] whileFalse:[ - line := aStream nextLine. + line := aStream nextLine. lineNo := lineNo + 1. line isNilOrEmptyCollection not ifTrue:[ - (line startsWith:'#') ifFalse:[ - - "/ must do it manually, caring for quoted strings. + (line startsWith:'#') ifFalse:[ + + "/ must do it manually, caring for quoted strings. "/ words := line asCollectionOfWords. - words := OrderedCollection new. - s := line readStream. - [s atEnd] whileFalse:[ - s skipSeparators. - s peek == $' ifTrue:[ - s next. - w := s upTo:$'. - s skipSeparators. - ] ifFalse:[ - w := s upToSeparator - ]. - words add:w - ]. - words size >= 3 ifTrue:[ - nm := (words at:1) withoutSeparators. - abbrev := (words at:2) withoutSeparators. - pkg := (words at:3) withoutSeparators. + words := OrderedCollection new. + s := line readStream. + [s atEnd] whileFalse:[ + s skipSeparators. + s peek == $' ifTrue:[ + s next. + w := s upTo:$'. + s skipSeparators. + ] ifFalse:[ + w := s upToSeparator + ]. + words add:w + ]. + words size >= 3 ifTrue:[ + nm := (words at:1) withoutSeparators. + abbrev := (words at:2) withoutSeparators. + pkg := (words at:3) withoutSeparators. aBlock argumentCount = 3 ifTrue:[ aBlock value:nm value:abbrev value:pkg. ] ifFalse:[ @@ -7095,9 +7106,9 @@ ] ] ifFalse:[ ('Smalltalk [warning]: malformed line ', lineNo printString , ' in ' , (aStream pathName)) infoPrintCR. - ] - ] - ] + ] + ] + ] ]. "Modified: / 13-12-1999 / 11:54:17 / cg" @@ -7134,7 +7145,7 @@ packageDir := self getPackageFileName:packageDirName. packageDir isNil ifTrue:[ - ^ nil. + ^ nil. ]. ^ packageDir asFilename @@ -7150,7 +7161,7 @@ projectDefinition := aPackageIdOrPackage. projectDefinition isProjectDefinition ifFalse:[ - projectDefinition := projectDefinition asPackageId projectDefinitionClass + projectDefinition := projectDefinition asPackageId projectDefinitionClass ]. projectDefinition unloadPackage. @@ -7166,7 +7177,7 @@ "remove all undeclared variables" (Smalltalk at:#Undeclared) do:[:eachKey | - Smalltalk removeKey:(self undeclaredPrefix , eachKey) asSymbol. + Smalltalk removeKey:(self undeclaredPrefix , eachKey) asSymbol. ]. (Smalltalk at:#Undeclared) removeAll. Smalltalk removeKey:#Undeclared. @@ -7253,7 +7264,7 @@ exp = __MKUINT(__getExpirationTime()); %}. exp == 0 ifTrue:[ - ^ nil + ^ nil ]. ^ Timestamp new fromOSTime:(exp * 1000). "OSTime is ms since 1970" @@ -7290,28 +7301,28 @@ lang := Language. (lang == #de) ifTrue:[ - proto := 'Willkommen bei %1 (Version %2 von %3)' + proto := 'Willkommen bei %1 (Version %2 von %3)' ] ifFalse:[ (lang == #fr) ifTrue:[ - proto := 'Salut, Bienvenue à %1 (version %2 de %3)' + proto := 'Salut, Bienvenue à %1 (version %2 de %3)' ] ifFalse:[ (lang == #it) ifTrue:[ - proto := 'Ciao, benvenuto al %1 (versione %2 di %3)' + proto := 'Ciao, benvenuto al %1 (versione %2 di %3)' ] ifFalse:[ (lang == #es) ifTrue:[ "/ proto := 'Hola, bienvenida a %1 (versión %2 de %3)' ] ifFalse:[ (lang == #es) ifTrue:[ "/ proto := 'Oi, benvindo a %1 (versão %2 de %3)' ] ifFalse:[ (lang == #no) ifTrue:[ - proto := 'Hei, verdenmottakelse til %1 (versjon %2 av %3)' + proto := 'Hei, verdenmottakelse til %1 (versjon %2 av %3)' ]]]]]]. "/ ... more needed here ... proto isNil ifTrue:[ - proto := 'Hello World - here is %1 version %2 of %3'. + proto := 'Hello World - here is %1 version %2 of %3'. ]. ^ proto bindWith:('SmallTalk/X' allBold) - with:(self versionString) - with:(self versionDate) + with:(self versionString) + with:(self versionDate) " Smalltalk language:#us. @@ -7380,7 +7391,7 @@ classes changes). ST/X revision Naming is: - ..." + ..." ^ 6 @@ -7400,7 +7411,7 @@ classes need rework. ST/X revision Naming is: - ..." + ..." ^ 1 @@ -7437,7 +7448,7 @@ their way to the outside world. ST/X revision Naming is: - ..." + ..." ^ 1 @@ -7459,13 +7470,13 @@ to the outside world. ST/X revision Naming is: - ..." + ..." ^ 2 " Smalltalk revisionNr - Smalltalk hello string + Smalltalk hello string " "Modified: / 12-08-2010 / 01:20:56 / cg" @@ -7553,13 +7564,14 @@ !Smalltalk class methodsFor:'documentation'! version - ^ '$Id: Smalltalk.st 10624 2011-03-19 13:06:11Z vranyj1 $' + ^ '$Id: Smalltalk.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.947 2011/01/16 09:20:09 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Smalltalk.st,v 1.949 2011-03-23 16:26:18 stefan Exp ' ! version_SVN - ^ '$Id: Smalltalk.st 10624 2011-03-19 13:06:11Z vranyj1 $' + ^ '$Id: Smalltalk.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SmalltalkChunkFileSourceReader.st --- a/SmalltalkChunkFileSourceReader.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SmalltalkChunkFileSourceReader.st Sat Apr 09 18:19:04 2011 +0100 @@ -47,15 +47,15 @@ !SmalltalkChunkFileSourceReader class methodsFor:'documentation'! version - ^ '$Id: SmalltalkChunkFileSourceReader.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmalltalkChunkFileSourceReader.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceReader.st,v 1.5 2009/10/08 11:56:01 fm Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/SmalltalkChunkFileSourceReader.st,v 1.5 2009-10-08 11:56:01 fm Exp §' ! version_SVN - ^ '$Id: SmalltalkChunkFileSourceReader.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmalltalkChunkFileSourceReader.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -65,3 +65,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a SmalltalkChunkFileSourceWriter.st --- a/SmalltalkChunkFileSourceWriter.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SmalltalkChunkFileSourceWriter.st Sat Apr 09 18:19:04 2011 +0100 @@ -505,16 +505,17 @@ !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'! version - ^ '$Id: SmalltalkChunkFileSourceWriter.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmalltalkChunkFileSourceWriter.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.12 2009/10/02 14:30:07 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.12 2009-10-02 14:30:07 cg Exp ' ! version_SVN - ^ '$Id: SmalltalkChunkFileSourceWriter.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SmalltalkChunkFileSourceWriter.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SmalltalkLanguage.st --- a/SmalltalkLanguage.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SmalltalkLanguage.st Sat Apr 09 18:19:04 2011 +0100 @@ -227,13 +227,14 @@ !SmalltalkLanguage class methodsFor:'documentation'! version - ^ '$Id: SmalltalkLanguage.st 10623 2011-03-17 15:08:28Z vranyj1 $' + ^ '$Id: SmalltalkLanguage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/SmalltalkLanguage.st,v 1.15 2011/01/30 14:20:27 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/SmalltalkLanguage.st,v 1.15 2011-01-30 14:20:27 cg Exp §' ! version_SVN - ^ '$Id: SmalltalkLanguage.st 10623 2011-03-17 15:08:28Z vranyj1 $' + ^ '$Id: SmalltalkLanguage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a StandaloneStartup.st --- a/StandaloneStartup.st Wed Apr 06 13:25:19 2011 +0100 +++ b/StandaloneStartup.st Sat Apr 09 18:19:04 2011 +0100 @@ -134,6 +134,12 @@ Transcript := Stderr. ! +verbose + ^ Verbose == true + + "Created: / 01-02-2011 / 15:52:47 / cg" +! + verboseInfo:msg Verbose == true ifFalse:[^ self]. self printInfo:msg @@ -209,9 +215,12 @@ |shouldExit| + self verboseInfo:('check for another app'). self isAnotherApplicationInstanceRunning ifTrue:[ + self verboseInfo:('other app is running'). shouldExit := self processStartupOfASecondInstance. shouldExit ifTrue:[ + self verboseInfo:('yes; go away'). self releaseApplicationMutex. Smalltalk isStandAloneApp ifTrue:[ Smalltalk exit. @@ -219,7 +228,7 @@ ]. ]. - "Modified: / 03-08-2010 / 17:27:25 / cg" + "Modified: / 04-02-2011 / 00:04:31 / cg" ! confirmOpenNewApplicationInstance @@ -268,6 +277,7 @@ | lastErrorCode alreadyExists handleAndLastErrorCode | OperatingSystem isMSDOSlike ifTrue:[ + self verboseInfo:('create mutex...'). handleAndLastErrorCode := OperatingSystem createMutexNamed: (self applicationUUID printString). MutexHandle := handleAndLastErrorCode first. lastErrorCode := handleAndLastErrorCode second. @@ -277,13 +287,14 @@ or:[lastErrorCode == 183 "ERROR_ALREADY_EXISTS" or:[lastErrorCode == 5 "ERROR_ACCESS_DENIED"]]. + self verboseInfo:('alreadyExists = ',alreadyExists printString). alreadyExists ifFalse:[OperatingSystem waitForSingleObject: MutexHandle]. ^ alreadyExists ]. ^ false. - "Modified: / 01-10-2010 / 18:27:29 / cg" + "Modified: / 04-02-2011 / 00:05:51 / cg" ! processStartupOfASecondInstance @@ -498,6 +509,8 @@ dlls notEmpty ifTrue:[ ObjectFileLoader loadObjectFiles:dlls. + ProjectDefinition initializeAllProjectDefinitions. + Display notNil ifTrue:[ "New view classes may have been loaded - have to update their styles" self verboseInfo:'update style caches of loaded dlls'. @@ -666,6 +679,7 @@ idx := CommandLineArguments indexOfAny:#('--newAppInstance'). idx == 0 ifTrue:[ self shouldReuseRunningApplication ifTrue:[ + self verboseInfo:('should reuse app'). "Multiple Application support: if another expecco is running, ask it to open another window for me. If that is the case, the following function will not return, but instead exit." @@ -688,7 +702,7 @@ self main ]. - "Modified: / 17-11-2010 / 10:10:22 / cg" + "Modified: / 04-02-2011 / 00:03:47 / cg" ! startStartBlockProcess @@ -798,15 +812,15 @@ !StandaloneStartup class methodsFor:'documentation'! version - ^ '$Id: StandaloneStartup.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: StandaloneStartup.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/StandaloneStartup.st,v 1.56 2010/11/17 09:12:07 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/StandaloneStartup.st,v 1.59 2011-03-23 16:05:22 stefan Exp ' ! version_SVN - ^ '$Id: StandaloneStartup.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: StandaloneStartup.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! StandaloneStartup initialize! @@ -816,3 +830,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Stream.st --- a/Stream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Stream.st Sat Apr 09 18:19:04 2011 +0100 @@ -3201,15 +3201,15 @@ !Stream class methodsFor:'documentation'! version - ^ '$Id: Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Stream.st,v 1.186 2010/08/19 13:43:26 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Stream.st,v 1.186 2010-08-19 13:43:26 cg Exp ' ! version_SVN - ^ '$Id: Stream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Stream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Stream initialize! @@ -3219,3 +3219,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a StreamError.st --- a/StreamError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/StreamError.st Sat Apr 09 18:19:04 2011 +0100 @@ -53,18 +53,19 @@ !StreamError class methodsFor:'documentation'! version - ^ '$Id: StreamError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: StreamError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/StreamError.st,v 1.7 2010/02/04 11:42:34 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/StreamError.st,v 1.7 2010-02-04 11:42:34 stefan Exp ' ! version_SVN - ^ '$Id: StreamError.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: StreamError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a String.st --- a/String.st Wed Apr 06 13:25:19 2011 +0100 +++ b/String.st Sat Apr 09 18:19:04 2011 +0100 @@ -3716,15 +3716,15 @@ !String class methodsFor:'documentation'! version - ^ '$Id: String.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: String.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/String.st,v 1.275 2011/01/12 13:51:12 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/String.st,v 1.275 2011-01-12 13:51:12 cg Exp ' ! version_SVN - ^ '$Id: String.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: String.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -3732,3 +3732,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a SubclassResponsibilityError.st --- a/SubclassResponsibilityError.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SubclassResponsibilityError.st Sat Apr 09 18:19:04 2011 +0100 @@ -61,16 +61,17 @@ !SubclassResponsibilityError class methodsFor:'documentation'! version - ^ '$Id: SubclassResponsibilityError.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SubclassResponsibilityError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/SubclassResponsibilityError.st,v 1.8 2010/12/19 11:59:59 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/SubclassResponsibilityError.st,v 1.8 2010-12-19 11:59:59 cg Exp §' ! version_SVN - ^ '$Id: SubclassResponsibilityError.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: SubclassResponsibilityError.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! SubclassResponsibilityError initialize! + diff -r 1602a49e146e -r 04ff72c5039a Symbol.st --- a/Symbol.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Symbol.st Sat Apr 09 18:19:04 2011 +0100 @@ -717,15 +717,16 @@ !Symbol class methodsFor:'documentation'! version - ^ '$Id: Symbol.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Symbol.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.91 2010/09/21 06:57:35 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Symbol.st,v 1.91 2010-09-21 06:57:35 stefan Exp ' ! version_SVN - ^ '$Id: Symbol.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Symbol.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a SystemChangeNotifier.st --- a/SystemChangeNotifier.st Wed Apr 06 13:25:19 2011 +0100 +++ b/SystemChangeNotifier.st Sat Apr 09 18:19:04 2011 +0100 @@ -113,11 +113,11 @@ !SystemChangeNotifier class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/SystemChangeNotifier.st,v 1.4 2010/04/14 16:13:57 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/SystemChangeNotifier.st,v 1.4 2010-04-14 16:13:57 cg Exp ' ! version_SVN - ^ '$Id: SystemChangeNotifier.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: SystemChangeNotifier.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -125,3 +125,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Time.st --- a/Time.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Time.st Sat Apr 09 18:19:04 2011 +0100 @@ -783,15 +783,15 @@ !Time class methodsFor:'documentation'! version - ^ '$Id: Time.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Time.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Time.st,v 1.89 2011/01/24 19:56:23 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Time.st,v 1.89 2011-01-24 19:56:23 stefan Exp ' ! version_SVN - ^ '$Id: Time.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Time.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -799,3 +799,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a TimeoutNotification.st --- a/TimeoutNotification.st Wed Apr 06 13:25:19 2011 +0100 +++ b/TimeoutNotification.st Sat Apr 09 18:19:04 2011 +0100 @@ -43,7 +43,7 @@ !TimeoutNotification class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/TimeoutNotification.st,v 1.1 2010/08/20 10:16:29 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/TimeoutNotification.st,v 1.1 2010-08-20 10:16:29 cg Exp ' ! version_SVN @@ -51,3 +51,4 @@ ! ! + diff -r 1602a49e146e -r 04ff72c5039a Timestamp.st --- a/Timestamp.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Timestamp.st Sat Apr 09 18:19:04 2011 +0100 @@ -2640,15 +2640,15 @@ !Timestamp class methodsFor:'documentation'! version - ^ '$Id: Timestamp.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Timestamp.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.136 2011/01/24 19:59:15 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Timestamp.st,v 1.136 2011-01-24 19:59:15 stefan Exp ' ! version_SVN - ^ '$Id: Timestamp.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Timestamp.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Timestamp initialize! @@ -2658,3 +2658,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a UndefinedObject.st --- a/UndefinedObject.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UndefinedObject.st Sat Apr 09 18:19:04 2011 +0100 @@ -691,18 +691,19 @@ !UndefinedObject class methodsFor:'documentation'! version - ^ '$Id: UndefinedObject.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UndefinedObject.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: UndefinedObject.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UndefinedObject.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.71 2010/07/28 17:20:51 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UndefinedObject.st,v 1.71 2010-07-28 17:20:51 cg Exp ' ! ! UndefinedObject initialize! + diff -r 1602a49e146e -r 04ff72c5039a UninterpretedBytes.st --- a/UninterpretedBytes.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UninterpretedBytes.st Sat Apr 09 18:19:04 2011 +0100 @@ -2902,15 +2902,15 @@ !UninterpretedBytes class methodsFor:'documentation'! version - ^ '$Id: UninterpretedBytes.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UninterpretedBytes.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.77 2010/07/19 13:58:34 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UninterpretedBytes.st,v 1.77 2010-07-19 13:58:34 stefan Exp ' ! version_SVN - ^ '$Id: UninterpretedBytes.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UninterpretedBytes.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! @@ -2918,3 +2918,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a UnixFilename.st --- a/UnixFilename.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UnixFilename.st Sat Apr 09 18:19:04 2011 +0100 @@ -207,18 +207,19 @@ !UnixFilename class methodsFor:'documentation'! version - ^ '$Id: UnixFilename.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UnixFilename.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.16 2009/10/28 14:02:12 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UnixFilename.st,v 1.16 2009-10-28 14:02:12 cg Exp ' ! version_SVN - ^ '$Id: UnixFilename.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UnixFilename.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a UnixOperatingSystem.st --- a/UnixOperatingSystem.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UnixOperatingSystem.st Sat Apr 09 18:19:04 2011 +0100 @@ -13106,15 +13106,15 @@ !UnixOperatingSystem class methodsFor:'documentation'! version - ^ '$Id: UnixOperatingSystem.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UnixOperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.279 2010/10/29 15:25:37 stefan Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UnixOperatingSystem.st,v 1.279 2010-10-29 15:25:37 stefan Exp ' ! version_SVN - ^ '$Id: UnixOperatingSystem.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UnixOperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! UnixOperatingSystem initialize! @@ -13128,3 +13128,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a UserMessage.st --- a/UserMessage.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UserMessage.st Sat Apr 09 18:19:04 2011 +0100 @@ -195,18 +195,19 @@ !UserMessage class methodsFor:'documentation'! version - ^ '$Id: UserMessage.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UserMessage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UserMessage.st,v 1.6 2009/10/02 00:08:10 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UserMessage.st,v 1.6 2009-10-02 00:08:10 cg Exp ' ! version_SVN - ^ '$Id: UserMessage.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UserMessage.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a UserNotification.st --- a/UserNotification.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UserNotification.st Sat Apr 09 18:19:04 2011 +0100 @@ -142,15 +142,15 @@ !UserNotification class methodsFor:'documentation'! version - ^ '$Id: UserNotification.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UserNotification.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.15 2009/10/14 17:34:46 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/UserNotification.st,v 1.15 2009-10-14 17:34:46 cg Exp ' ! version_SVN - ^ '$Id: UserNotification.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: UserNotification.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! UserNotification initialize! @@ -159,3 +159,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a UserPreferences.st --- a/UserPreferences.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UserPreferences.st Sat Apr 09 18:19:04 2011 +0100 @@ -1435,9 +1435,13 @@ ! showDottedLinesInTree - ^ self at:#showDottedLinesInTree ifAbsent:true + ^ self + at:#showDottedLinesInTree + ifAbsent:[ OperatingSystem isMSWINDOWSlike not + or:[ OperatingSystem isVistaLike not ] ] "Created: / 03-12-2010 / 11:31:46 / cg" + "Modified: / 09-02-2011 / 23:27:03 / cg" ! showDottedLinesInTree:aBoolean @@ -2096,9 +2100,9 @@ ! commentEmphasisAndColor - ^ Text addEmphasis:(self commentEmphasis) to:(#color->self commentColor). - - + ^ self emphasis:(self commentEmphasis) andColor:(self commentColor). + + "Modified: / 17-02-2011 / 14:20:41 / cg" ! constantColor @@ -2155,8 +2159,11 @@ "the emphasis used for anything else; If syntaxColoring is turned on." - ^ self at:#defaultSyntaxEmphasis ifAbsentPut:[UserPreferences default at:#defaultSyntaxEmphasis] - + ^ self + at:#defaultSyntaxEmphasis + ifAbsentPut:[UserPreferences default at:#defaultSyntaxEmphasis] + + "Modified: / 17-02-2011 / 14:17:30 / cg" ! doesNotUnderstand:aMessage @@ -2190,6 +2197,12 @@ ^ super doesNotUnderstand:aMessage ! +emphasis:e andColor:c + ^ Text addEmphasis:e to:(#color->c). + + "Created: / 17-02-2011 / 14:20:25 / cg" +! + emphasizeParenthesisLevel ^ self at:#emphasizeParenthesisLevel ifAbsent:true @@ -2498,6 +2511,12 @@ "Modified: / 1.4.1998 / 13:22:00 / cg" ! +stringEmphasisAndColor + ^ self emphasis:(self stringEmphasis) andColor:(self stringColor). + + "Created: / 17-02-2011 / 14:29:10 / cg" +! + superColor "the color used for the super pseudoVariable; If syntaxColoring is turned on." @@ -2601,6 +2620,34 @@ "Created: / 31.3.1998 / 19:11:55 / cg" "Modified: / 1.4.1998 / 13:22:45 / cg" +! + +xmlTagColor + "the emphasis used for xml-tags; + If syntaxColoring is turned on." + + ^ self at:#xmlTagColor ifAbsentPut:[ Color blue ] + + " + self current at:#xmlTagColor put:Color black + self current xmlTagColor + " + + "Created: / 17-02-2011 / 14:18:28 / cg" +! + +xmlTagEmphasis + "the emphasis used for xml-tags; + If syntaxColoring is turned on." + + ^ self at:#xmlTagEmphasis ifAbsentPut:[ #bold ] + + " + self current at:#xmlTagEmphasis put:#normal + self current xmlTagEmphasis + " + + "Created: / 17-02-2011 / 14:18:01 / cg" ! ! !UserPreferences methodsFor:'accessing-prefs-code'! @@ -3464,13 +3511,14 @@ !UserPreferences class methodsFor:'documentation'! version - ^ '$Id: UserPreferences.st 10621 2011-03-08 02:57:52Z vranyj1 $' + ^ '$Id: UserPreferences.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.265 2010/12/03 10:31:59 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/UserPreferences.st,v 1.268 2011-02-17 13:33:23 cg Exp §' ! version_SVN - ^ '$Id: UserPreferences.st 10621 2011-03-08 02:57:52Z vranyj1 $' + ^ '$Id: UserPreferences.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a UtcTimestamp.st --- a/UtcTimestamp.st Wed Apr 06 13:25:19 2011 +0100 +++ b/UtcTimestamp.st Sat Apr 09 18:19:04 2011 +0100 @@ -111,5 +111,6 @@ !UtcTimestamp class methodsFor:'documentation'! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/UtcTimestamp.st,v 1.3 2011/01/24 17:58:33 stefan Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/UtcTimestamp.st,v 1.3 2011-01-24 17:58:33 stefan Exp §' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Visitor.st --- a/Visitor.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Visitor.st Sat Apr 09 18:19:04 2011 +0100 @@ -262,14 +262,15 @@ !Visitor class methodsFor:'documentation'! version - ^ '$Id: Visitor.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Visitor.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Visitor.st,v 1.7 2011/01/24 13:20:08 stefan Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Visitor.st,v 1.7 2011-01-24 13:20:08 stefan Exp §' ! version_SVN - ^ '$Id: Visitor.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Visitor.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a Warning.st --- a/Warning.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Warning.st Sat Apr 09 18:19:04 2011 +0100 @@ -155,15 +155,15 @@ !Warning class methodsFor:'documentation'! version - ^ '$Id: Warning.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Warning.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Warning.st,v 1.14 2009/10/14 17:34:52 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Warning.st,v 1.14 2009-10-14 17:34:52 cg Exp ' ! version_SVN - ^ '$Id: Warning.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Warning.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Warning initialize! @@ -172,3 +172,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a WeakArray.st --- a/WeakArray.st Wed Apr 06 13:25:19 2011 +0100 +++ b/WeakArray.st Sat Apr 09 18:19:04 2011 +0100 @@ -1020,15 +1020,15 @@ !WeakArray class methodsFor:'documentation'! version - ^ '$Id: WeakArray.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: WeakArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_SVN - ^ '$Id: WeakArray.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: WeakArray.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/WeakArray.st,v 1.66 2010/08/11 14:11:08 sr Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/WeakArray.st,v 1.66 2010-08-11 14:11:08 sr Exp §' ! ! WeakArray initialize! @@ -1036,3 +1036,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Win32Constants.st --- a/Win32Constants.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Win32Constants.st Sat Apr 09 18:19:04 2011 +0100 @@ -62,11 +62,11 @@ !Win32Constants class methodsFor:'documentation'! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Win32Constants.st,v 1.4 2010/12/24 10:22:26 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Win32Constants.st,v 1.4 2010-12-24 10:22:26 cg Exp ' ! version_SVN - ^ '$Id: Win32Constants.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Win32Constants.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Win32Constants initialize! @@ -76,3 +76,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Win32OperatingSystem.st --- a/Win32OperatingSystem.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Win32OperatingSystem.st Sat Apr 09 18:19:04 2011 +0100 @@ -814,7 +814,6 @@ "Modified: 7.1.1997 / 19:36:11 / stefan" ! ! - !Win32OperatingSystem class methodsFor:'OS signal constants'! sigABRT @@ -3325,48 +3324,48 @@ "Internal lowLevel entry for combined fork & exec for WIN32 If fork is false (chain a command): - execute the OS command specified by the argument, aCommandPath, with - arguments in argArray (no arguments, if nil). - If successful, this method does not return and smalltalk is gone. - If not successful, it does return. - Normal use is with forkForCommand. + execute the OS command specified by the argument, aCommandPath, with + arguments in argArray (no arguments, if nil). + If successful, this method does not return and smalltalk is gone. + If not successful, it does return. + Normal use is with forkForCommand. If fork is true (subprocess command execution): - fork a child to do the above. - The process id of the child process is returned; nil if the fork failed. + fork a child to do the above. + The Win32ProcessHandle of the child process is returned; nil if the fork failed. fdArray contains the filedescriptors, to be used for the child (if fork is true). - fdArray[1] = 15 -> use fd 15 as stdin. - If an element of the array is set to nil, the corresponding filedescriptor - will be closed for the child. - fdArray[0] == StdIn for child - fdArray[1] == StdOut for child - fdArray[2] == StdErr for child - on VMS, these must be channels as returned by createMailBox. + fdArray[1] = 15 -> use fd 15 as stdin. + If an element of the array is set to nil, the corresponding filedescriptor + will be closed for the child. + fdArray[0] == StdIn for child + fdArray[1] == StdOut for child + fdArray[2] == StdErr for child + on VMS, these must be channels as returned by createMailBox. NOTE that in WIN32 the fds are HANDLES. If newPgrp is true, the subprocess will be established in a new process group. - The processgroup will be equal to id. - newPgrp is not used on WIN32 and VMS systems." + The processgroup will be equal to id. + newPgrp is not used on WIN32 and VMS systems." |dirPath rslt| aDirectory notNil ifTrue:[ - dirPath := aDirectory asFilename asAbsoluteFilename osNameForDirectory. - (dirPath endsWith:':') ifTrue:[ - dirPath := dirPath , '\'. - ]. + dirPath := aDirectory asFilename asAbsoluteFilename osNameForDirectory. + (dirPath endsWith:':') ifTrue:[ + dirPath := dirPath , '\'. + ]. ]. rslt := self - primExec:aCommandPath - commandLine:argString - fileDescriptors:fdArray - fork:doFork - newPgrp:newPgrp - inPath:dirPath - createFlags:nil. + primExec:aCommandPath + commandLine:argString + fileDescriptors:fdArray + fork:doFork + newPgrp:newPgrp + inPath:dirPath + createFlags:nil. "/ 'created ' print. cmdLine print. ' -> ' print. rslt printCR. ^ rslt @@ -3386,41 +3385,43 @@ 'sh -c' in your UNIX manual ('cmd.com' in your MSDOS manual). The command gets stdIn, stdOut and stdErr assigned from the arguments; each may be nil. - Return the processId if successful, nil otherwise. + + Return the Win32ProcessHandle if successful, nil otherwise. + Use #monitorPid:action: for synchronization and exec status return, or #killProcess: to stop it." |nullStream in out err rslt auxFd| (in := anExternalInStream) isNil ifTrue:[ - nullStream := Filename nullDevice readWriteStream. - in := nullStream. + nullStream := Filename nullDevice readWriteStream. + in := nullStream. ]. (out := anExternalOutStream) isNil ifTrue:[ - nullStream isNil ifTrue:[nullStream := Filename nullDevice writeStream]. - out := nullStream. + nullStream isNil ifTrue:[nullStream := Filename nullDevice writeStream]. + out := nullStream. ]. (err := anExternalErrStream) isNil ifTrue:[ - err := out + err := out ]. anAuxiliaryStream notNil ifTrue:[ - auxFd := anAuxiliaryStream fileDescriptor + auxFd := anAuxiliaryStream fileDescriptor ]. rslt := self - exec:commandString - withArguments:argString - environment:anEvironmentDictionary - fileDescriptors:(Array with:in fileDescriptor - with:out fileDescriptor - with:err fileDescriptor - with:auxFd) - fork:true - newPgrp:true "/ false - inDirectory:dir. + exec:commandString + withArguments:argString + environment:anEvironmentDictionary + fileDescriptors:(Array with:in fileDescriptor + with:out fileDescriptor + with:err fileDescriptor + with:auxFd) + fork:true + newPgrp:true "/ false + inDirectory:dir. nullStream notNil ifTrue:[ - nullStream close. + nullStream close. ]. ^ rslt @@ -3443,7 +3444,7 @@ The following will no longer work. monitorPid has disappeared pid notNil ifTrue:[ - Processor monitorPid:pid action:[:OSstatus | sema signal ]. + Processor monitorPid:pid action:[:OSstatus | sema signal ]. ]. in close. out close. @@ -3855,7 +3856,9 @@ 'sh -c' in your UNIX manual ('cmd.com' in your MSDOS manual). The command gets stdIn, stdOut and stdErr assigned from the arguments; each may be nil. - Return the processId if successful, nil otherwise. + + Return the Win32ProcessHandle if successful, nil otherwise. + Use #monitorPid:action: for synchronization and exec status return, or #killProcess: to stop it." @@ -3866,10 +3869,10 @@ shellAndArgs := self commandAndArgsForOSCommand:aCommandString. ^ self - exec:(shellAndArgs at:1) withArguments:(shellAndArgs at:2) - inputFrom:anExternalInStream outputTo:anExternalOutStream - errorTo:anExternalErrStream auxFrom:anAuxiliaryStream - environment:anEvironmentDictionary inDirectory:dir + exec:(shellAndArgs at:1) withArguments:(shellAndArgs at:2) + inputFrom:anExternalInStream outputTo:anExternalOutStream + errorTo:anExternalErrStream auxFrom:anAuxiliaryStream + environment:anEvironmentDictionary inDirectory:dir "blocking at current prio (i.e. only higher prio threads execute): @@ -3890,7 +3893,7 @@ The following will no longer work. monitorPid has disappeared pid notNil ifTrue:[ - Processor monitorPid:pid action:[:OSstatus | sema signal ]. + Processor monitorPid:pid action:[:OSstatus | sema signal ]. ]. in close. out close. @@ -8281,8 +8284,8 @@ ^ true ! -isProcessIdPresent:pid - "answer true, if a process with process id pid is present, false if not. +isProcessIdPresent:processHandleOrPid + "answer true, if a process with process id pid (or handle) is present, false if not. Raise an error, if an exception occures" |error| @@ -8291,29 +8294,49 @@ HANDLE processHandle; int err; - if (__isSmallInteger(pid)) { - // assume, that synchronize needs less privilege... - processHandle = OpenProcess(SYNCHRONIZE, FALSE, __smallIntegerVal(pid)); - if (processHandle) { - CloseHandle(processHandle); - RETURN(true); - } - - err = GetLastError(); - // we do not have access to the process (so pid does exist ;-)) - if (err == ERROR_ACCESS_DENIED) { - RETURN(true); - } - // pid does not exist - if (err == ERROR_INVALID_PARAMETER) { - RETURN(false); - } - - // any other error - raise signal - __threadErrno = __WIN32_ERR(err); - error = __mkSmallInteger(__threadErrno); + if (__isExternalAddressLike(processHandleOrPid) ) { + DWORD exitCode; + + processHandle = _HANDLEVal(processHandleOrPid); + + if (processHandle == 0) { + error = @symbol(invalidParameter); + } else { + /* check if the handle still refers to a running process */ + if (GetExitCodeProcess(processHandle, &exitCode) != 0) { + if (exitCode == STILL_ACTIVE) { + RETURN(true); + } else { + RETURN(false); + } + } else { + goto checkError; + } + } + } else if( __isSmallInteger(processHandleOrPid) ) { + // assume, that synchronize needs less privilege... + processHandle = OpenProcess(SYNCHRONIZE, FALSE, __smallIntegerVal(processHandleOrPid)); + if (processHandle) { + CloseHandle(processHandle); + RETURN(true); + } + +checkError: + err = GetLastError(); + // we do not have access to the process (so pid does exist ;-)) + if (err == ERROR_ACCESS_DENIED) { + RETURN(true); + } + // pid does not exist + if (err == ERROR_INVALID_PARAMETER) { + RETURN(false); + } + + // any other error - raise signal + __threadErrno = __WIN32_ERR(err); + error = __mkSmallInteger(__threadErrno); } else { - error = @symbol(invalidParameter); + error = @symbol(invalidParameter); } %}. @@ -9446,25 +9469,28 @@ ! dateFormat - "Answer the current system value for date format. - Answer DfMDY = Month-Day-Year - DfDMY = Day-Month-Year - DfYMD = Year-Month-Day." - |separatorString| + "Answer the current system value for date format. + Answer DfMDY = Month-Day-Year + DfDMY = Day-Month-Year + DfYMD = Year-Month-Day." + + |separatorString code| separatorString := self dateSeparator. - self dateFormatCode = 0 ifTrue:[^'%(mon)', separatorString, '%(day)', separatorString, '%(year)']. - self dateFormatCode = 1 ifTrue:[^'%(day)', separatorString, '%(mon)', separatorString, '%(year)']. - self dateFormatCode = 2 ifTrue:[^'%(year)', separatorString, '%(mon)', separatorString, '%(day)']. - - ^'%(day)', separatorString, '%(mon)', separatorString, '%(year)' - - " - self dateFormat + code := self dateFormatCode. + code = 0 ifTrue:[ ^ '%(mon)', separatorString, '%(day)', separatorString, '%(year)' ]. + code = 1 ifTrue:[ ^ '%(day)', separatorString, '%(mon)', separatorString, '%(year)' ]. + code = 2 ifTrue:[ ^ '%(year)', separatorString, '%(mon)', separatorString, '%(day)' ]. + + ^ '%(day)', separatorString, '%(mon)', separatorString, '%(year)' + + " + self dateFormat " "Modified: / 22-12-2006 / 16:43:30 / User" + "Modified: / 28-03-2011 / 17:10:01 / cg" ! dateFormatCode @@ -9646,19 +9672,22 @@ This looks for the files extension, and is typically used to present help-files, html documents, pdf documents etc. operationSymbol is one of: - open - edit" + open + edit + explore + print + " |result filename| filename := aFilenameOrString asFilename. result := self - shellExecute:nil - lpOperation:operationSymbol - lpFile:filename pathName - lpParameters:nil - lpDirectory:filename directory pathName - nShowCmd:#SW_SHOWNORMAL. + shellExecute:nil + lpOperation:operationSymbol + lpFile:filename pathName + lpParameters:nil + lpDirectory:filename directory pathName + nShowCmd:#SW_SHOWNORMAL. ^ self. " @@ -9669,7 +9698,7 @@ " "Created: / 04-08-2006 / 18:04:52 / fm" - "Modified: / 26-01-2007 / 14:05:44 / cg" + "Modified: / 05-02-2011 / 16:25:31 / cg" ! ! !Win32OperatingSystem class methodsFor:'socket support'! @@ -16307,15 +16336,15 @@ !Win32OperatingSystem class methodsFor:'documentation'! version - ^ '$Id: Win32OperatingSystem.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Win32OperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.417 2011/01/19 15:04:48 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/Win32OperatingSystem.st,v 1.420 2011-03-28 15:10:10 cg Exp ' ! version_SVN - ^ '$Id: Win32OperatingSystem.st 10604 2011-02-04 23:09:23Z vranyj1 $' + ^ '$Id: Win32OperatingSystem.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! Win32OperatingSystem initialize! @@ -16329,3 +16358,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a Win32Process.st --- a/Win32Process.st Wed Apr 06 13:25:19 2011 +0100 +++ b/Win32Process.st Sat Apr 09 18:19:04 2011 +0100 @@ -217,11 +217,11 @@ !Win32Process class methodsFor:'documentation'! version - ^ '$Id: Win32Process.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: Win32Process.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/Win32Process.st,v 1.2 2010/02/01 11:29:35 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/Win32Process.st,v 1.2 2010-02-01 11:29:35 cg Exp §' ! ! @@ -229,3 +229,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a WriteStream.st --- a/WriteStream.st Wed Apr 06 13:25:19 2011 +0100 +++ b/WriteStream.st Sat Apr 09 18:19:04 2011 +0100 @@ -622,18 +622,19 @@ !WriteStream class methodsFor:'documentation'! version - ^ '$Id: WriteStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: WriteStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.71 2009/10/05 09:19:55 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/WriteStream.st,v 1.71 2009-10-05 09:19:55 cg Exp ' ! version_SVN - ^ '$Id: WriteStream.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: WriteStream.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a YesToAllConfirmation.st --- a/YesToAllConfirmation.st Wed Apr 06 13:25:19 2011 +0100 +++ b/YesToAllConfirmation.st Sat Apr 09 18:19:04 2011 +0100 @@ -101,15 +101,16 @@ !YesToAllConfirmation class methodsFor:'documentation'! version - ^ '$Id: YesToAllConfirmation.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: YesToAllConfirmation.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ '§Header: /cvs/stx/stx/libbasic/YesToAllConfirmation.st,v 1.6 2010/10/14 08:38:03 cg Exp §' + ^ '§Header: /var/local/cvs/stx/libbasic/YesToAllConfirmation.st,v 1.6 2010-10-14 08:38:03 cg Exp §' ! version_SVN - ^ '$Id: YesToAllConfirmation.st 10602 2010-12-20 07:13:27Z vranyj1 $' + ^ '$Id: YesToAllConfirmation.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a abbrev.stc --- a/abbrev.stc Wed Apr 06 13:25:19 2011 +0100 +++ b/abbrev.stc Sat Apr 09 18:19:04 2011 +0100 @@ -370,4 +370,6 @@ Unicode16String Unicode16String stx:libbasic 'Collections-Text' 0 CharacterEncoderImplementations::EBCDIC CharacterEncoderImplementations__EBCDIC stx:libbasic 'Collections-Text-Encodings' 0 SameForAllNotification SameForAllNotification stx:libbasic 'Kernel-Exceptions-Notifications' 1 -UtcTimestamp UtcTimestamp stx:libbasic 'Magnitude-Time' 0 \ No newline at end of file +UtcTimestamp UtcTimestamp stx:libbasic 'Magnitude-Time' 0 +InvalidPatchError InvalidPatchError stx:libbasic 'Kernel-Exceptions-Errors' 1 +AbortAllOperationWantedQuery AbortAllOperationWantedQuery stx:libbasic 'Kernel-Exceptions-Control' 1 diff -r 1602a49e146e -r 04ff72c5039a bc.mak --- a/bc.mak Wed Apr 06 13:25:19 2011 +0100 +++ b/bc.mak Sat Apr 09 18:19:04 2011 +0100 @@ -1,4 +1,4 @@ -# $Header: /cvs/stx/stx/libbasic/bc.mak,v 1.169 2011/01/24 20:31:51 stefan Exp $ +# $Header: /var/local/cvs/stx/libbasic/bc.mak,v 1.171 2011-02-09 10:45:58 cg Exp $ # # DO NOT EDIT # automagically generated from the projectDefinition: stx_libbasic. @@ -192,6 +192,7 @@ $(OUTDIR)YesToAllConfirmation.$(O) YesToAllConfirmation.$(H): YesToAllConfirmation.st $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)stx_libbasic.$(O) stx_libbasic.$(H): stx_libbasic.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)AbortAllOperationRequest.$(O) AbortAllOperationRequest.$(H): AbortAllOperationRequest.st $(INCLUDE_TOP)\stx\libbasic\ControlRequest.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) +$(OUTDIR)AbortAllOperationWantedQuery.$(O) AbortAllOperationWantedQuery.$(H): AbortAllOperationWantedQuery.st $(INCLUDE_TOP)\stx\libbasic\Query.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)AbstractSourceFileWriter.$(O) AbstractSourceFileWriter.$(H): AbstractSourceFileWriter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Query.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(STCHDR) $(OUTDIR)ActivityNotification.$(O) ActivityNotification.$(H): ActivityNotification.st $(INCLUDE_TOP)\stx\libbasic\UserNotification.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)Array.$(O) Array.$(H): Array.st $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) @@ -254,6 +255,7 @@ $(OUTDIR)Float.$(O) Float.$(H): Float.st $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)GetOpt.$(O) GetOpt.$(H): GetOpt.st $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)ImmutableArray.$(O) ImmutableArray.$(H): ImmutableArray.st $(INCLUDE_TOP)\stx\libbasic\Array.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) +$(OUTDIR)InvalidPatchError.$(O) InvalidPatchError.$(H): InvalidPatchError.st $(INCLUDE_TOP)\stx\libbasic\ProceedableError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)LargeInteger.$(O) LargeInteger.$(H): LargeInteger.st $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)LongFloat.$(O) LongFloat.$(H): LongFloat.st $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)MessageNotUnderstood.$(O) MessageNotUnderstood.$(H): MessageNotUnderstood.st $(INCLUDE_TOP)\stx\libbasic\ProceedableError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) @@ -353,3 +355,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a libInit.cc --- a/libInit.cc Wed Apr 06 13:25:19 2011 +0100 +++ b/libInit.cc Sat Apr 09 18:19:04 2011 +0100 @@ -1,5 +1,5 @@ /* - * $Header: /cvs/stx/stx/libbasic/libInit.cc,v 1.162 2011/01/24 20:39:47 stefan Exp $ + * $Header: /var/local/cvs/stx/libbasic/libInit.cc,v 1.164 2011-02-09 10:46:14 cg Exp $ * * DO NOT EDIT * automagically generated from the projectDefinition: stx_libbasic. @@ -166,6 +166,7 @@ _YesToAllConfirmation_Init(pass,__pRT__,snd); _stx_137libbasic_Init(pass,__pRT__,snd); _AbortAllOperationRequest_Init(pass,__pRT__,snd); +_AbortAllOperationWantedQuery_Init(pass,__pRT__,snd); _AbstractSourceFileWriter_Init(pass,__pRT__,snd); _ActivityNotification_Init(pass,__pRT__,snd); _Array_Init(pass,__pRT__,snd); @@ -228,6 +229,7 @@ _Float_Init(pass,__pRT__,snd); _GetOpt_Init(pass,__pRT__,snd); _ImmutableArray_Init(pass,__pRT__,snd); +_InvalidPatchError_Init(pass,__pRT__,snd); _LargeInteger_Init(pass,__pRT__,snd); _LongFloat_Init(pass,__pRT__,snd); _MessageNotUnderstood_Init(pass,__pRT__,snd); @@ -335,3 +337,4 @@ } + diff -r 1602a49e146e -r 04ff72c5039a libbasic.rc --- a/libbasic.rc Wed Apr 06 13:25:19 2011 +0100 +++ b/libbasic.rc Sat Apr 09 18:19:04 2011 +0100 @@ -3,7 +3,7 @@ // automagically generated from the projectDefinition: stx_libbasic. // VS_VERSION_INFO VERSIONINFO - FILEVERSION 6,1,1,79 + FILEVERSION 6,1,1,81 PRODUCTVERSION 6,1,2,1 FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD @@ -18,12 +18,12 @@ BEGIN VALUE "CompanyName", "eXept Software AG\0" VALUE "FileDescription", "Smalltalk/X Basic Classes (LIB)\0" - VALUE "FileVersion", "6.1.1.79\0" + VALUE "FileVersion", "6.1.1.81\0" VALUE "InternalName", "stx:libbasic\0" - VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2009\nCopyright eXept Software AG 1998-2009\0" + VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0" VALUE "ProductName", "Smalltalk/X\0" VALUE "ProductVersion", "6.1.2.1\0" - VALUE "ProductDate", "Mon, 24 Jan 2011 20:27:14 GMT\0" + VALUE "ProductDate", "Wed, 09 Feb 2011 10:45:51 GMT\0" END END @@ -35,3 +35,4 @@ END + diff -r 1602a49e146e -r 04ff72c5039a resources/af.rs --- a/resources/af.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/af.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/af.rs,v 1.3 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/af.rs,v 1.3 2004-03-15 16:39:09 cg Exp $ ; ; Afrikaans strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/de.rs --- a/resources/de.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/de.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/de.rs,v 1.8 2010/06/08 19:20:52 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/de.rs,v 1.8 2010-06-08 19:20:52 cg Exp $ ; ; German strings ; @@ -199,3 +199,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/el.rs --- a/resources/el.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/el.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-7 -; $Header: /cvs/stx/stx/libbasic/resources/el.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/el.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Greek strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/en.rs --- a/resources/en.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/en.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/en.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/en.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; English date strings ; @@ -147,3 +147,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/eo.rs --- a/resources/eo.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/eo.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding utf8 -; $Header: /cvs/stx/stx/libbasic/resources/eo.rs,v 1.3 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/eo.rs,v 1.3 2004-03-15 16:39:09 cg Exp $ ; ; Esperanto strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/fr.rs --- a/resources/fr.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/fr.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/fr.rs,v 1.3 2008/02/05 12:23:42 sr Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/fr.rs,v 1.3 2008-02-05 12:23:42 sr Exp $ ; ; French strings ; @@ -54,3 +54,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/hu.rs --- a/resources/hu.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/hu.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding utf-8 -; $Header: /cvs/stx/stx/libbasic/resources/hu.rs,v 1.2 2006/10/23 10:20:55 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/hu.rs,v 1.2 2006-10-23 10:20:55 cg Exp $ ; ; Hungarian strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/it.rs --- a/resources/it.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/it.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/it.rs,v 1.4 2006/10/28 14:11:17 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/it.rs,v 1.4 2006-10-28 14:11:17 cg Exp $ ; ; Italian strings ; @@ -58,3 +58,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/ja.rs --- a/resources/ja.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/ja.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding utf-8 -; $Header: /cvs/stx/stx/libbasic/resources/ja.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/ja.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Japanese strings ; @@ -63,3 +63,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/nl.rs --- a/resources/nl.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/nl.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/nl.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/nl.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Dutch strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/no.rs --- a/resources/no.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/no.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/no.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/no.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Norwegian strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/pt.rs --- a/resources/pt.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/pt.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/pt.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/pt.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Portuguese strings ; @@ -53,3 +53,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/resources.rs --- a/resources/resources.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/resources.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,7 +1,7 @@ #encoding ascii ; -; $Header: /cvs/stx/stx/libbasic/resources/resources.rs,v 1.8 2008/11/28 16:44:55 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/resources.rs,v 1.8 2008-11-28 16:44:55 cg Exp $ ; #if Language == #af @@ -132,3 +132,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/ro.rs --- a/resources/ro.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/ro.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-2 -; $Header: /cvs/stx/stx/libbasic/resources/ro.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/ro.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Romanian strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/ru.rs --- a/resources/ru.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/ru.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-5 -; $Header: /cvs/stx/stx/libbasic/resources/ru.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/ru.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Russian strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/sv.rs --- a/resources/sv.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/sv.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/sv.rs,v 1.3 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/sv.rs,v 1.3 2004-03-15 16:39:09 cg Exp $ ; ; Swedish strings ; @@ -56,3 +56,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/tr.rs --- a/resources/tr.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/tr.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding iso8859-1 -; $Header: /cvs/stx/stx/libbasic/resources/tr.rs,v 1.2 2004/03/15 16:39:09 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/tr.rs,v 1.2 2004-03-15 16:39:09 cg Exp $ ; ; Turkish strings ; @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/zh.rs --- a/resources/zh.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/zh.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding utf8 -; $Header: /cvs/stx/stx/libbasic/resources/zh.rs,v 1.2 2008/11/28 16:44:28 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/zh.rs,v 1.2 2008-11-28 16:44:28 cg Exp $ ; ; Chinese simplified ; extracted from google by claus - can someone proofread, please. @@ -52,3 +52,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a resources/zh_trad.rs --- a/resources/zh_trad.rs Wed Apr 06 13:25:19 2011 +0100 +++ b/resources/zh_trad.rs Sat Apr 09 18:19:04 2011 +0100 @@ -1,6 +1,6 @@ #encoding utf8 -; $Header: /cvs/stx/stx/libbasic/resources/zh_trad.rs,v 1.2 2008/11/28 16:50:03 cg Exp $ +; $Header: /var/local/cvs/stx/libbasic/resources/zh_trad.rs,v 1.2 2008-11-28 16:50:03 cg Exp $ ; ; Chinese traditional ; this file contains 8bit national characters; @@ -13,3 +13,4 @@ + diff -r 1602a49e146e -r 04ff72c5039a stx_libbasic.st --- a/stx_libbasic.st Wed Apr 06 13:25:19 2011 +0100 +++ b/stx_libbasic.st Sat Apr 09 18:19:04 2011 +0100 @@ -490,7 +490,11 @@ #'CharacterEncoderImplementations::EBCDIC' SameForAllNotification UtcTimestamp + InvalidPatchError + AbortAllOperationWantedQuery ) + + "Modified: / 09-02-2011 / 11:44:49 / cg" ! extensionMethodNames @@ -529,22 +533,23 @@ "Return a SVN revision number of myself. This number is updated after a commit" - ^ "$SVN-Revision:"'10621M'"$" + ^ "$SVN-Revision:"'10631M'"$" ! ! !stx_libbasic class methodsFor:'documentation'! version - ^ '$Id: stx_libbasic.st 10622 2011-03-14 12:10:14Z vranyj1 $' + ^ '$Id: stx_libbasic.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! version_CVS - ^ 'Header: /cvs/stx/stx/libbasic/stx_libbasic.st,v 1.80 2011/02/01 10:58:58 cg Exp ' + ^ 'Header: /var/local/cvs/stx/libbasic/stx_libbasic.st,v 1.82 2011-02-09 10:46:16 cg Exp ' ! version_SVN - ^ '$Id: stx_libbasic.st 10622 2011-03-14 12:10:14Z vranyj1 $' + ^ '$Id: stx_libbasic.st 10632 2011-04-09 17:19:04Z vranyj1 $' ! ! + diff -r 1602a49e146e -r 04ff72c5039a vms.mak --- a/vms.mak Wed Apr 06 13:25:19 2011 +0100 +++ b/vms.mak Sat Apr 09 18:19:04 2011 +0100 @@ -2,7 +2,7 @@ # DO NOT EDIT # automatically generated from Make.proto # -# $Header: /cvs/stx/stx/libbasic/vms.mak,v 1.9 2001/10/31 15:02:19 cg Exp $ +# $Header: /var/local/cvs/stx/libbasic/vms.mak,v 1.9 2001-10-31 15:02:19 cg Exp $ # TOP=.. LIBNAME=libbasic @@ -300,3 +300,4 @@ +