[Pharo-users] Matrix error

Offray Vladimir Luna Cárdenas offray at riseup.net
Fri Oct 23 21:23:58 EDT 2015


Hi,

I made an small matrix implementation. Nothing fancy. Just an array of 
arrays and is working. Just curious now about the error message.

Cheers,

Offray

On 23/10/15 19:56, Offray Vladimir Luna Cárdenas wrote:
> Hi,
>
> I was testing the code here:
>
> =[1]=========
>
> | medMatrix   |
> medMatrix := Matrix new.
> medMatrix
>     numberOfColumns: 7;
>     numberOfRows: 5.
>
> 1 to: medMatrix numberOfRows do: [:row |
>     1 to: medMatrix numberOfColumns do: [ :column |
>         "medMatrix at: row at: column  put: 0."
>         Transcript show: row asString, ',', column asString, '|'.
>     ].
>     Transcript show: cr.
> ].
> medMatrix.
>
> ===========
>
> and I got a transcript like this:
>
> =[2]==========
> 1,1|1,2|1,3|1,4|1,5|1,6|1,7|nil2,1|2,2|2,3|2,4|2,5|2,6|2,7|nil3,1|3,2|3,3|3,4|3,5|3,6|3,7|nil4,1|4,2|4,3|4,4|4,5|4,6|4,7|nil5,1|5,2|5,3|5,4|5,5|5,6|5,7|nil'[Spotter] 
> Exception while collecting processors for <Matrix>: Error: Instances 
> of UndefinedObject are not indexable'
> '[Spotter] Exception while collecting processors for <Matrix>: Error: 
> Instances of UndefinedObject are not indexable'
> '[Spotter] Exception while collecting processors for <Matrix>: Error: 
> Instances of UndefinedObject are not indexable'
> '[Spotter] Exception while collecting processors for <Matrix>: Error: 
> Instances of UndefinedObject are not indexable'
> =============
>
> I tried also with SciSmalltalk matrix, but they seem to be only square 
> ones.
>
> What's is the problem with matrices? Why I'm getting Undefined Objects 
> while trying to iterate or populate them?
>
> Thanks,
>
> Offray
>
>





More information about the Pharo-users mailing list