What’s the best way to get objects from a window. I have a sudoku-like grid of 81 NSTextFields and I would prefer to simply have an array of NSTextFields instead of 81 individual NSTextFields linked through IBOutlets.
For example: if there was a way to send a message to NSWindow such as getObject: (NSString*) title and then use a for-loop to add these NSTextFields to an NSMutableArray, that would be ideal. Any suggestions would be appreciated!
-Luke
You could do the following:
in -awakeFromNib
Now for the nagging, I don’t think you should do it this way. Creating a custom NSView to act as a “Sudoku” view would be both easier to use in your code and better for performance of your application. Loading the Window with 81 textFields is quite heavy + uses a lot more memory.