How do I share an NSArrayController between two nib files?
Posted
by Tom Dalling
on Stack Overflow
See other posts from Stack Overflow
or by Tom Dalling
Published on 2010-05-18T00:40:02Z
Indexed on
2010/05/18
0:51 UTC
Read the original article
Hit count: 339
I have an array of images, and two nib files. One nib file has a window that displays the images in an NSTableView. The other nib has a window that draws the array of images into an NSView, and also draws a highlight over the images that are selected.
The array of images is controlled by an NSArrayController. I'm having trouble getting the two nibs to share the NSArrayController. I would have two separate NSArrayControllers bound to the same content, but I also want both nibs to share the controller's selection; that is, if you select an image in the table window, it also becomes selected in the other window.
Is there a standard way to do this?
© Stack Overflow or respective owner