I have managed to create a matrix of image cells from within the IDE.
I have then managed to add images from an array of filepaths, displaying each image in the matrix.
I can’t find info anywhere in the Studio docs from Apple any solution to adding additional cells, columns of cells or rows of cells to the matrix programmatically.
I have played around with call method without success.
Can anyone please provide a pointer in the right direction.
TIA
tellboy
Hi,
Have been experimenting with call method using:
set tObj to matrix "thumbnails" of scroll view "thumbnails" of window "ThumbNails"
call method "renewRows:columns:" of tObj with parameters {10, 10}
call method "sizeToCells" of tObj
This creates 10 rows by 10 cols of image cells.
If the cells previously were 8 rows by 8 cols then it uses these cells in preference to creating new ones.
More experimentation is necessary with regard to addRow and addColumn.
Anybody any more info.
Regards
tellboy
A further update:
set tObj to matrix "thumbnails" of scroll view "thumbnails" of window "ThumbNails"
call method "renewRows:columns:" of tObj with parameters {10, 10}
call method "sizeToCells" of tObj
call method "addRow" of tObj
call method "sizeToCells" of tObj
call method "addColumn" of tObj
call method "sizeToCells" of tObj
Having used this script you end up with 10 columns and 10 rows.
Regards
tellboy