Quantcast

How is this supposed to work in SIXX?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How is this supposed to work in SIXX?

GLASS mailing list
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,



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

sixxError.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How is this supposed to work in SIXX?

GLASS mailing list
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 <[hidden email]> 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,



--



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How is this supposed to work in SIXX?

GLASS mailing list
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 <[hidden email]> 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 <[hidden email]> 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,



--



--



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How is this supposed to work in SIXX?

GLASS mailing list

... 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 <[hidden email]> 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 <[hidden email]> 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,



--



--



--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Loading...