[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Some small patches (not net-related)
From: |
Mike Anderson |
Subject: |
[Help-smalltalk] Some small patches (not net-related) |
Date: |
Thu, 07 Apr 2005 10:11:26 +0000 |
User-agent: |
Mozilla Thunderbird 0.7.3 (X11/20040803) |
Hello all,
a) PositionableStream >> peekFor: does not work for FileStreams
b) Is it worth adding CharacterArray >> findString:startingAt: for
compatibility with VW? It wraps around indexOfSubCollection:startingAt,
but reads better. We already have indexOf:matchCase:startingAt:, but
that uses wildcards, so it is a little different.
(I started off this email thinking that we should add it, but now I am
not sure, so I've rephrased it as a question).
c) There is a small bug in XML.XMLParser >> pubIdLiteral (Characters
can't be compared against SmallIntegers).
d) The XML package generally calls (Exception subclass) >> #raiseSignal.
We could either change the calls to #signal instead, or add a
compatibility method. I favour the former, because the exception
mechanisms are different in any case.
Regards,
Mike
PS. I suddenly discovered that tab-completion has been added to the
command-line interpreter! Paolo, you should really spend more time
advertising the new features you're putting in.
The Java bindings are another example - I notice a new directory has
suddenly appeared, and in the meantime, everyone is getting excited on
comp.lang.smalltalk about Smalltalk/JVM. OK, I realize that they do
different things, but I still think that people would be very interested.
--- smalltalk-2.1g-orig/kernel/CharArray.st 2003-11-24 11:42:02.000000000
+0000
+++ smalltalk-2.1g/kernel/CharArray.st 2005-04-07 09:19:10.142942232 +0000
@@ -580,3 +580,8 @@
^true
! !
+!CharacterArray methodsFor: 'VisualWorks compatibility'!
+
+findString: aSubString startingAt: aIndex
+ ^self indexOfSubCollection: aSubString startingAt: aIndex
+! !
--- smalltalk-2.1g-orig/kernel/PosStream.st 2003-11-24 11:42:02.000000000
+0000
+++ smalltalk-2.1g/kernel/PosStream.st 2005-04-07 09:28:17.676704448 +0000
@@ -99,7 +99,7 @@
"Returns true and gobbles the next element from the stream of it is
equal to anObject, returns false and doesn't gobble the next element
if the next element is not equal to anObject."
- ptr > endPtr ifTrue: [ ^false ].
+ self atEnd ifTrue: [ ^false ].
^self next = anObject
ifTrue: [ true ]
ifFalse: [ self skip: -1. false ]
--- smalltalk-2.1g-orig/xml/XML.st 2003-09-04 05:48:55.000000000 +0000
+++ smalltalk-2.1g/xml/XML.st 2005-04-07 09:24:48.465509384 +0000
@@ -2207,11 +2207,12 @@
!SAXDriver methodsFor: 'error handler'!
+
fatalError: anException
- anException raiseSignal!
+ anException signal!
nonFatalError: anException
- anException raiseSignal!
+ anException signal!
warning: anException
Transcript nl; show: anException messageText! !
@@ -3777,7 +3778,7 @@
((' -''()+,./:=?;address@hidden' includes: ch)
or: [ch asInteger = 10
or: [ch asInteger = 13
- or: [ch < 127
+ or: [ch asciiValue < 127
and: [ch isLetter or: [ch isDigit]]]]])
ifFalse: [self malformed: 'Invalid public id character found']].
str replaceAll: Character tab with: Character space.
@@ -5026,10 +5027,11 @@
aURIstring = SAXNamespacePrefixes
ifTrue: [^self showNamespaceDeclarations].
aURIstring = SAXExternalGeneralEntities
- ifTrue: [^SAXNotSupportedException raiseSignal].
+ ifTrue: [^SAXNotSupportedException signal].
aURIstring = SAXExternalParameterEntities
- ifTrue: [^SAXNotSupportedException raiseSignal].
- SAXNotRecognizedException new raiseSignal!
+ ifTrue: [^SAXNotSupportedException signal].
+ SAXNotRecognizedException new signal
+!
atFeature: aURIstring put: aBoolean
aURIstring = SAXValidate
@@ -5039,16 +5041,19 @@
aURIstring = SAXNamespacePrefixes
ifTrue: [^self showNamespaceDeclarations: aBoolean].
aURIstring = SAXExternalGeneralEntities
- ifTrue: [^SAXNotSupportedException raiseSignal].
+ ifTrue: [^SAXNotSupportedException signal].
aURIstring = SAXExternalParameterEntities
- ifTrue: [^SAXNotSupportedException raiseSignal].
- SAXNotRecognizedException new raiseSignal!
+ ifTrue: [^SAXNotSupportedException signal].
+ SAXNotRecognizedException new signal
+!
atProperty: aURIstring
- SAXNotRecognizedException new raiseSignal!
+ SAXNotRecognizedException new signal
+!
atProperty: aURIstring put: anObject
- SAXNotRecognizedException new raiseSignal!
+ SAXNotRecognizedException new signal
+!
contentHandler
^sax contentHandler!
- [Help-smalltalk] Some small patches (not net-related),
Mike Anderson <=