Array2D
inherits the following class methods from Collection:
fill
fill2D
fill3D
fillND
newFrom
with
Regarding method fill2D
:
- A doc search only links to Collection
&
Array - Array2D help page lists it as an inherited class method
-
Array2D.fill2D(...)
fails with the following post error:
The preceding error dump is for ERROR: 'add' should have been implemented by Array2D RECEIVER: Array2D[ [ nil ][ nil ][ nil ][ nil ][ nil ][ nil ][ nil ][ nil ] ]
This is the full code that produced the error message:
(((
Array2D.fill2D // to produce an 8X8 table of fundamental frequencies
(
8 , 8 , // rows & columns
{
|o n| ( [ 27, 30, 33, 36, 40.5, 45, 48, 51 ] [ n ] ) * ( [ 1 ] ++ Array.geom(7, 2, 2) @ o )
}
)
)))
I suppose it may be interesting that it still created an Array2D
with 8 sub-arrays⦠each containing a single nil
instance⦠typical new
behavior would be 8 sub-arrays with 8 instances of nil
each, or 64 in total.
If this should be an issue on github, then just let me know and Iāll post it there.
Hereās the full error message:
ERROR: āaddā should have been implemented by Array2D.
RECEIVER:
Instance of Array2D { (000002737AB68C08, gc=C4, fmt=00, flg=00, set=02)
instance variables [3]
rows : Integer 8
cols : Integer 1
array : instance of Array (000002737A508468, size=8, set=3)
}
CALL STACK:
MethodError:reportError
arg this =
Nil:handleError
arg this = nil
arg error =
Thread:handleError
arg this =
arg error =
Object:throw
arg this =
Object:subclassResponsibility
arg this =
arg method = Collection:add
< FunctionDef in Method Meta_Collection:fill2D >
arg col = 0
Integer:do
arg this = 8
arg function =
var i = 0
< FunctionDef in Method Meta_Collection:fill2D >
arg row = 0
var obj2 =
Integer:do
arg this = 8
arg function =
var i = 0
Meta_Collection:fill2D
arg this =
arg rows = 8
arg cols = 8
arg function =
var obj =
Interpreter:interpretPrintCmdLine
arg this =
var res = nil
var func =
var code = ā(((
Array2D.fill2D
(ā¦ā
var doc = nil
var ideClass =
Process:interpretPrintCmdLine
arg this =
^^ The preceding error dump is for ERROR: āaddā should have been implemented by Array2D.
RECEIVER: Array2D[ [ nil ][ nil ][ nil ][ nil ][ nil ][ nil ][ nil ][ nil ] ]
The same for Collection.fill2D
, though more understandably, as an āabstract class.ā
ERROR: āaddā should have been implemented by Collection.
RECEIVER: Collection[ ]