--- a/AbstractOperatingSystem.st Tue Dec 11 16:04:59 2001 +0100
+++ b/AbstractOperatingSystem.st Tue Dec 11 16:07:01 2001 +0100
@@ -16,7 +16,7 @@
instanceVariableNames:''
classVariableNames:'ConcreteClass LastErrorNumber LocaleInfo OSSignals PipeFailed
ErrorSignal AccessDeniedErrorSignal FileNotFoundErrorSignal
- InvalidArgumentsSignal UnsupportedOperationSignal'
+ InvalidArgumentsSignal UnsupportedOperationSignal Resources'
poolDictionaries:''
category:'System-Support'
!
@@ -152,6 +152,10 @@
!AbstractOperatingSystem class methodsFor:'initialization'!
+initResources
+ Resources := ResourcePack for:self
+!
+
initialize
"initialize the class"
@@ -177,9 +181,8 @@
UnsupportedOperationSignal := ErrorSignal newSignalMayProceed:true.
UnsupportedOperationSignal nameClass:self message:#unsupportedOperationSignal.
UnsupportedOperationSignal notifierString:'operation not supported by this OS'.
- ]
-
- "Modified: / 19.5.1999 / 14:21:28 / cg"
+ ].
+ Smalltalk addDependent:self. "/ to catch language changes
!
initializeConcreteClass
@@ -549,6 +552,14 @@
^ UnsupportedOperationSignal
! !
+!AbstractOperatingSystem class methodsFor:'change & update'!
+
+update:something with:aParameter from:changedObject
+ ((something == #Language) or:[something == #LanguageTerritory]) ifTrue:[
+ self initResources
+ ]
+! !
+
!AbstractOperatingSystem class methodsFor:'error messages'!
clearLastErrorNumber
@@ -590,6 +601,21 @@
^ -1
!
+errorStringForSymbol:errorSymbol
+ "return an errorMessage for an errorSymbol
+ (as kept in an osErrorHolder)."
+
+ Resources isNil ifTrue:[
+ ^ errorSymbol
+ ].
+ ^ Resources at:errorSymbol ifAbsent:errorSymbol
+
+ "
+ OperatingSystem errorStringForSymbol:#EPERM
+ OperatingSystem errorStringForSymbol:(OperatingSystem errorSymbolForNumber:4)
+ "
+!
+
errorSymbolAndTextForNumber:errNr
"return an array consisting of symbol & message string from a unix errorNumber
(as returned by a system call).
@@ -4354,6 +4380,6 @@
!AbstractOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.52 2001-11-08 15:23:13 md Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.53 2001-12-11 15:07:01 cg Exp $'
! !
AbstractOperatingSystem initialize!