NSMatrix bindings mayhem -
I want to use the NSMatrix
so that a 6- day work for employees (columns) week (6 rows) Fwaiai, since NSTableView
does not cell-to-cell drag-and-drop support, oh I have to instead use NSMatrix
.
However, I want to use If I have an employee, then there will be 6 items in my array. However, if I add another employee, then the data of the employee 1 also needs to be captured on the array index (0-2-4-6-8-10), and the data in employee 2 is a weird index (1 -3-5-7- 9-11). If I want to remove Employee 1 now, then I have to remove 10,8,6,4,2,0 items in that order! Yowza Am I reading this right? Is anyone else related to this madness? Actually, my initial arguments were correct - that is, with the built-in array for the content, That the material is from top to bottom to top, an array of 10 elements in 5x2 matrix will be kept with these indices: so I pieces of a couple of code sharing with you ... for example, I think I have a The code to insert / delete rows continuously with the array (much easier) Areas are left as) exercise for the reader; -) NSArray
content
for coke binding, NSMatrix .
NSMatrix
returns
0 1 2 3 4 5 6 7 8 9 >
a sub-classified [self insColAtIndex: self.matrix.numberOfColumns] a call to a new one with new items Mat In the X, the last column added with the
"X" on this result:
< p> Any early-size 0 1 2 3 4 x 5 6 7 8 9x
allocation with NSMatrix
to the desired height of the N rows with at least 1 column, here NSArrayController control in two ways
NSMatrix
and its content array organizations work together: NSMutableIndexSet
could be made with the array index hit insertObjects with an array of NSMatrix at once (: atArrangedObjectIndexes:
and removeObjectsAtArrangedObjectIndexes: < / Code>), but it seemed more troublesome that it was worth it.
Comments
Post a Comment