Re: Sharing NSViews

2008-08-08 Thread c. mendoza
That is a good point... my data is indeed separate from the view, all that needs synchronization is a couple of custom controls, which could perhaps be handled via notifications. thanks, c. On Aug 8, 2008, at 9:56 PM, Graham Cox wrote: On 9 Aug 2008, at 11:44 am, c. mendoza wrote: Why

Re: Sharing NSViews

2008-08-08 Thread Roland King
On Aug 9, 2008, at 9:44 AM, c. mendoza wrote: Why do you think you need to do this anyway? If you have a view class just create a new instance of it. Because the two views should be synchronized Are they views on the same model? If they are and you have your MVC working properly, ch

Re: Sharing NSViews

2008-08-08 Thread Graham Cox
On 9 Aug 2008, at 11:44 am, c. mendoza wrote: Why do you think you need to do this anyway? If you have a view class just create a new instance of it. Because the two views should be synchronized If you need to go out of your way to "synchronise" two views, maybe your design could do wi

Re: Sharing NSViews

2008-08-08 Thread c. mendoza
On Aug 8, 2008, at 9:07 PM, Graham Cox wrote: Well then, you have your answer. Yes, I assumed this was so, but I wanted to check if there was something I was missing. A view presumably maintains a back reference to its superview, and only has one of these, so if it's added to a new sup

Re: Sharing NSViews

2008-08-08 Thread Graham Cox
On 9 Aug 2008, at 10:56 am, c. mendoza wrote: Hey All, Is it possible to share an NSView across two different panels or windows? I tried adding a view I already had in one of my windows to a floating panel, but that view "disappeared" from its original placement in the window and only sh

Re: Sharing NSViews

2008-08-08 Thread Gary L. Wade
Each view has knowledge of only one superview and window. If you're wanting to coordinate the two views, you'd need to wire up a controller or use notifications to keep them in sync. c. mendoza wrote: Hey All, Is it possible to share an NSView across two different panels or windows? I tried

Sharing NSViews

2008-08-08 Thread c. mendoza
Hey All, Is it possible to share an NSView across two different panels or windows? I tried adding a view I already had in one of my windows to a floating panel, but that view "disappeared" from its original placement in the window and only showed up in the panel. thanks, c. On Aug 8, 2