[Glass] How is this supposed to work in SIXX?
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Thu May 11 06:51:55 PDT 2017
... you are invited
On 5/11/17 5:17 AM, Mariano Martinez Peck via Glass wrote:
> Dale or Paul, could you please add me as a contributor to
> https://github.com/glassdb/SIXX please?
>
> Otherwise I can fork and make a PR.
>
> Cheers,
>
> On Thu, May 11, 2017 at 9:03 AM, Mariano Martinez Peck
> <marianopeck at gmail.com <mailto:marianopeck at gmail.com>> wrote:
>
> OK, I found the issue. It's a problem of BaselineOfSixx with
> GemStone 3.3.3. I will explain better soon and commit a fix.
>
> Cheers,
>
> On Wed, May 10, 2017 at 5:17 PM, Mariano Martinez Peck
> <marianopeck at gmail.com <mailto:marianopeck at gmail.com>> wrote:
>
> Hi,
>
> I am getting an error when I am trying to import a SIXX file
> generated in Gemstone 3.3.3 and I am importing it in another
> GemStone 3.3.3. Attached is the stack.
>
> The problem is in
>
> Object >> initializeInstVarsFromSixxElement: sixxElement
> context: aSixxContext
> | coll |
> coll := (SixxXmlUtil elementsFrom: sixxElement) select: [:elem
> | (SixxXmlUtil isTextFrom: elem) not ].
> *coll reverse*
> do: .......
>
> In this example, what I get as "coll" is an instance of
> *XMLOrderedList*.
> And " coll reverse" does not work at all. Why, because code is:
>
> SequenceablCollection >> reverse
> "Returns a copy of the receiver with its elements in reverse
> order."
>
> | copy sz high mid |
> sz := self size.
> *copy := self species new: sz.*
> * copy size < sz*
> * ifTrue: [ copy size: sz"handle OrderedCollection" ].*
> high := sz.
> mid := sz bitShift: -1." // 2 "
> 1 to: mid do: [ :low |
> *copy at: low put: (self at: high).*
> copy at: high put: (self at: low).
> high := high - 1 ].
> ....... "code clipped"
>
>
> "self species new: sz" is a "XMLOrderedList new: 6".
> even with the ifTrue: below, doing "(XMLOrderedList new: 6)
> size: 6" it's still not a 6 elements collection.
>
> So... when we do "* copy at: low put: (self at: high)." *it
> fails. XMLOrderedList does implement #at:put: but this way:
>
> at: anIndex put: aValue
> ^ collection at: anIndex put: aValue
>
> And clearly...the "collection" inside is 0 size, not 6.
> ((XMLOrderedList new: 6) size: 6) collection size -> 0
>
>
> So...how could this ever work? Damn...I am sure missing
> something.
>
> Any clue is appreciated.
>
> Bye,
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
> <http://marianopeck.wordpress.com>
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com <http://marianopeck.wordpress.com>
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170511/cce8dc3f/attachment.html>
More information about the Glass
mailing list