[Glass] [Jade]: Failure when Inpection an instance of IdentitySet
BrunoBB via Glass
glass at lists.gemtalksystems.com
Sat Oct 4 09:57:45 PDT 2014
Hi,
I did hit this bug but asOrderedCollection is a workaround i never mind...
Is a Bug in JadeServer64bit3x>>inspect: method in Dolphin code.
In my image i did a very ugly workaround... (you have to close Dolphin image
and open it again in order to work)
anObject class format > 0 ifTrue: [
1 to: (anObject _basicSize min: 100) do: [:i |
i printOn: stream.
stream tab.
self print: (self oopOf: ([anObject _basicAt: i] on: Error do:[:err |
anObject asOrderedCollection _basicAt: i])) on: stream. "BRUNO UGLY FIX"
stream lf.
].
The complete #inspect: method is:
inspect: anObject
| stream list dynamic string size |
(stream := WriteStream on: String new)
nextPutAll: anObject class name; tab;
yourself.
(self oopOf: anObject) printOn: stream.
stream lf.
(anObject isKindOf: Dictionary superclass) ifTrue: [^self
inspectDictionary: anObject on: stream].
list := anObject class allInstVarNames.
dynamic := anObject dynamicInstanceVariables.
size := list size + dynamic size.
anObject class format > 0 ifTrue: [
size := size + (anObject _basicSize min: 100).
].
size printOn: stream.
stream lf.
1 to: list size do: [:i |
stream nextPutAll: (list at: i); tab.
self print: (self oopOf: (anObject instVarAt: i)) on: stream.
stream lf.
].
1 to: dynamic size do: [:i |
stream nextPutAll: (dynamic at: i); tab.
self print: (self oopOf: (anObject dynamicInstVarAt: (dynamic at: i))) on:
stream.
stream lf.
].
anObject class format > 0 ifTrue: [
1 to: (anObject _basicSize min: 100) do: [:i |
i printOn: stream.
stream tab.
self print: (self oopOf: ([anObject _basicAt: i] on: Error do:[:err |
anObject asOrderedCollection _basicAt: i])) on: stream. "BRUNO FIX"
stream lf.
].
].
(string := anObject printString) size > 5000 ifTrue: [string := (string
copyFrom: 1 to: 5000) , '...'].
string class == String ifFalse: [
string := String withAll: (string collect: [:each | (32 <= each codePoint
and: [each codePoint <= 127]) ifTrue: [each] ifFalse: [$?]]).
].
^stream
nextPutAll: string;
contents.
--
View this message in context: http://forum.world.st/Glass-Jade-Failure-when-Inpection-an-instance-of-IdentitySet-tp4781781p4782614.html
Sent from the GLASS mailing list archive at Nabble.com.
More information about the Glass
mailing list