Thanks. That info made it much easier to try. Sorry I didn't end up with an answer for you, but I confirm there is some issue here, or something new I can learn when other chip in. Here is what I tried. * Installed XMLParser (monty.58) from Configuration Browser in Pharo 3. * Ran your code. Got the same error. * From the call stack I observed that XMLOrderedCollection(SequenceableCollection)>>copyReplaceFrom:to:with: has the line "newSequenceableCollection := self species new: newSize." such that it seems your error might be reduced to the question of why the following two snippets fail: d := OrderedCollection new: 1. d at: 1 put: 1. e := OrderedCollection new: 3. e at: 2 put: 1. However I'm sorry that is beyond my knowledge, and I'm hoping someone else can chip in so I can learn something. Pushing on, I noticed that XMLOrderedList has an instance variable /collection/ which holds the OrderedCollection. Now I wonder (without great experience and hoping to learn something) if it smells funny that XMLOrderedList inherits all of SequencableCollection methods that can not operate on /collection/. I noticed that XMLOrderedList was using an inherited SequenceableCollection>>copyReplaceFrom:to:with while OrderedCollection overrode that method with its own. So taking inspiration XMLOrderedList>>copyFrom:to: to override SequencableCollection>>copyReplaceFrom:to:with: to work with /collection/ seems to solve your problem: XMLOrderedList>>copyReplaceFrom: start to: stop with: replacementCollection ^ self newWithCollection: (collection copyReplaceFrom: start to: stop with: replacementCollection ) Along the way I noticed a few (possible) bugs that seems not related to your problem: * When stepping through XMLOrderedList>>setCollection: there is a red-box-of-death for the instance variables, which can be solved by defining the following. XMLOrderedList>>size ^ collection ifNil: [ 0 ] ifNotNil: [ collection size] * In the debugger the /collection/ instance variable is not shown! (e.g. line XMLOrderedList>>at:put:). Can someone confirm this should show? HTH cheers -ben Thushar G R wrote:
|
- [Pharo-users] XMLOrderedList Concantenation Thushar G R
- Re: [Pharo-users] XMLOrderedList Concantenation Ben Coman
- Re: [Pharo-users] XMLOrderedList Concantena... Thushar G R
- Re: [Pharo-users] XMLOrderedList Concan... Ben Coman
- Re: [Pharo-users] XMLOrderedList Co... Nicolai Hess
- Re: [Pharo-users] XMLOrderedLi... Sven Van Caekenberghe
- Re: [Pharo-users] XMLOrderedList Co... Carlo
- Re: [Pharo-users] XMLOrderedLi... Nicolai Hess
- Re: [Pharo-users] XMLOrder... Carlo
- Re: [Pharo-users] XMLOrder... btc
- Re: [Pharo-users] XMLO... Nicolai Hess
- Re: [Pharo-users] XMLOrderedList Concantenation Thushar G R