• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sharing a content view between two NSWindows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sharing a content view between two NSWindows


  • Subject: Re: Sharing a content view between two NSWindows
  • From: Roland Torres <email@hidden>
  • Date: Tue, 13 Mar 2007 11:03:24 -0700

Frank, Shawn, Simon,

Thanks for the pointers. I have an NSMatrix that I dynamically update and change in real time. I was hoping I could share it between two NSWindows by simply having each window set its content view to the one NSMatrix, but as Shawn pointed out, a view can only have one super view. So do I have to make another NSMatrix, and maintain it along with the original? Seems like a waste. I was also hoping I could just issue a -copy to it, but that's not supported for views.

Thanks,
Roland

On Mar 13, 2007, at 12:52 AM, Frank Reiff wrote:

Dear Roland,

It is true that you cannot have the same _instance_ of NSView shared between two windows, but you can certainly instantiate the same view definition twice by loading it from a separate nib file. That will give you two separate controllers linked to the same model.

Best regards,

Frank


On 12 Mar 2007, at 23:11, Roland Torres wrote:

I have two NSWindows, and I would like them to both share the same content view. They're to be displayed on different screens; one is on a control panel; the other is what people see, full-screen, on a dedicated monitor.

It seems that -setContentView:cview somehow removes cview from wherever it's currently associated, and associates it only with the receiver. Is there a way to share a content view between two NSViews?

Roland

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
40publicspace.net


This email sent to email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Sharing a content view between two NSViews (From: Roland Torres <email@hidden>)
 >Re: Sharing a content view between two NSViews (From: Frank Reiff <email@hidden>)

  • Prev by Date: Re: NSMatrix with different size cells?
  • Next by Date: Re: Weird app window behavior on PowerPC-based Mac
  • Previous by thread: Re: Sharing a content view between two NSViews
  • Next by thread: Calling -stringValue on a spell checked text field clears the misspellings?
  • Index(es):
    • Date
    • Thread