<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hi Folks,<br></div><div><br></div><div>I am going through the RSChartExample examples.<br></div><div><br></div><div>Most are working.<br></div><div><br></div><div>The one below prefaced with an 'x' are not working , those without the 'x' are working...<br></div><div><br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>RSChartExample new example01Markers open.<br></div><div>RSChartExample new example02ScatterPlot open.<br></div><div>RSChartExample new example03Plot open.<br></div><div>RSChartExample new example04WithTick open.<br></div><div>RSChartExample new example05WithTick open.<br></div><div>RSChartExample new example06CustomNumberOfTicks open.<br></div><div>RSChartExample new example07AdjustingFontSize open.<br></div><div>RSChartExample new example08TwoCharts open.<br></div><div>RSChartExample new example09LinearSqrtSymlog open.<br></div><div>RSChartExample new example10BarPlot open.<br></div><div>RSChartExample new example11BarplotCombinedWithLine open.<br></div><div>RSChartExample new example12ScatterPlotAndNormalizer open.<br></div><div>xRSChartExample new example13AreaPlot open.<br></div><div>xRSChartExample new example14AreaPlotWithError open.<br></div><div>xRSChartExample new example15AreaBox open.<br></div><div>xRSChartExample new example16Series open.<br></div><div>xRSChartExample new example17CLPvsUSD open.<br></div><div>xRSChartExample new example18Animation open.<br></div><div><br></div></div></blockquote><div><br></div><div>The ones with the 'x' are failing on a method I have imported from pharo<br></div><div><br></div><div>Collection, Dictionary, SequenceableCollection, SortedCollection need to implement flatCollect:<br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>Collection >>flatCollect: aBlock <br></div><div>"Evaluate aBlock for each of the receiver's elements and answer the<br></div><div>list of all resulting values flatten one level. Assumes that aBlock returns some kind<br></div><div>of collection for each element. Equivalent to the lisp's mapcan"<br></div><div><br></div><div>"( #((3 4) (1 2)) flatCollect: [:each | each ] )>>> #(3 4 1 2)"<br></div><div>"( #(3 4 1 2) flatCollect: [:each | { each } ] ) >>> #(3 4 1 2)"<br></div><div><br></div><div>^ self flatCollect: aBlock as: self species<br></div></div></blockquote><div>etc...<br></div><div><br></div><div>The error I am getting is an 'Attempt to index a non-existent element in an OrderedCollection from the flatCollect in SequenceableCollection...(The breaks and method vars are mine as I attempt to grok this)<br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>SequenceableCollection >> flatCollect: aBlock<br></div><div>"Evaluate aBlock for each of the receiver's elements and answer the<br></div><div>list of all resulting values flatten one level. Assumes that aBlock returns some kind<br></div><div>of collection for each element. optimized version for Sequencable Collection and subclasses<br></div><div>implementing #writeStream"<br></div><div><br></div><div>"(#( (2 -3) (4 -5) #(-6)) flatCollect: [ :e | e abs  ]) >>> #(2 3 4 5 6)"<br></div><div><br></div><div>"(#( (2 -3) #((4 -5)) #(-6)) flatCollect: [ :e | e abs  ]) >>> #(2 3 #(4 5) 6)"<br></div><div>|x i|<br></div><div>self isEmpty<br></div><div>ifTrue: [ ^ self copy ].<br></div><div>i := 0.<br></div><div>x := self species<br></div><div>new: 0<br></div><div>streamContents: [ :stream | self do: [ :each |<br></div><div>i := i +1.<br></div><div>stream nextPutAll: (aBlock value: each). <b> <--BARFS HERE</b><br></div><div>self break. <b> <--NEVER REACHED</b><br></div><div>]].<br></div><div><br></div><div>^x.<br></div><div><br></div></div></blockquote><div><br></div><div>The above fails in<br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>SequenceableCollection >> replaceFrom: start to: stop with: replacement startingAt: repStart <br></div><div>"This destructively replaces elements from start to stop in the receiver<br></div><div>starting at index, repStart, in the sequenceable collection,<br></div><div>replacementCollection. Answer the receiver. No range checks are<br></div><div>performed."<br></div><div><br></div><div>| index repOff |<br></div><div>repOff := repStart - start.<br></div><div>index := start - 1.<br></div><div>[(index := index + 1) <= stop]<br></div><div>whileTrue: [self at: index put: (replacement at: repOff + index)]   <b><- BARF HERE</b><br></div><div><br></div></div></blockquote><div>at the at: put:<br></div><div><br></div><div>I will be figuring this out next.<br></div><div><br></div><div><br></div><div>FWIW, using the Git Browser on the pharo repo...I make the pharo9 "current' and then am able to get GradientPaint and required classes into Squeak....<br></div><div><br></div><div>steps are these:  <br></div><div><br></div><div><br></div><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><div>From Git Browser....<br></div><div><br></div><div>Switch to Pharo9 branch.<br></div><div><br></div><div>src/Athens-Core browse Edition in Selected Version<br></div><div>in the browser...Athens-Core-Paints->AthensAbstractPaint<br></div><div>load class.<br></div><div>same for, GradientPaint  LinearGradientPaint and RadialGradientPaint<br></div></div></blockquote><div>anyhoo, progress.<br></div><div><br></div><div><br></div><div>Also, the Morphic folks, once we get this working, will probably want to poke around to make the BalloonMorphs behave.<br></div><div><br></div><div><br></div><div><br></div></div><br></body></html>