Methods for creating matrices
There is a method:[font=”Fixedsys”] matrices.create(Object content)[/font] described as:
[INDENT]”For each argument, creates a new Matrix and initializes it from that argument, then adds it to the list.” [/INDENT]
What is the definition of the content parameter? It only seems to recognize a Name. Can one initialize any more than that – say a list of categories and items – and if so what is the data structure for the content parameter?
I realize this can be done by building the matrix step by step using add methods, but I was hoping to use an existing matrix object as the structure to provide the initialization, thereby avoiding all that. This would be pretty much the equivalent of a matrix copy operation.
Thanks
Simon
Hi Simon,
The idea is for the method to be able to accept any object, pick up on what it is, and intelligently create a new matrix using exactly as much relevant state as that object has to offer. So if you pass it just a string, it will create a blank matrix using that string as a name, while if you pass it a whole matrix it will act like a matrix copy. Currently, however, it appears that the implementation does not understand anything more than names. The interface remains generic to leave room for making it smarter in the future.
Ben