Sorry for reposting, I made a mess previously.
The following shows, I think, what I am trying to do with a single array, not two and also shows where the error is because that part of the array is not dim'd as Rect. How do I do that? I thought I could have a mixed array rather than aThings(6,6,2) as Rect; all the same
The following shows, I think, what I am trying to do with a single array, not two and also shows where the error is because that part of the array is not dim'd as Rect. How do I do that? I thought I could have a mixed array rather than aThings(6,6,2) as Rect; all the same
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim cvsGrid As Canvas
Dim col,row,kWH=20dip As Int
Dim aThings(6,6,2) '0=Rect; 1=colour; 2=?? later
cvsGrid.Initialize(Activity)
For row=0 To 5
For col=0 To 5 'The next line gives error 'initialize', obviously
aThings(col,row,0).Initialize((col+1)+col*kWH,(row+1)+row*kWH,(col+1)+col*kWH+kWH,(row+1)+row*kWH+kWH)
aThings(col,row,1)=Colors.Blue
cvsGrid.DrawRect(aThings(col, row, 0),aThings(col, row, 1),True,1dip)
Next
Next
End Sub
Last edited: