• 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: Problem with NSDatePicker in popover
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSDatePicker in popover


  • Subject: Re: Problem with NSDatePicker in popover
  • From: "William J. Cheeseman" <email@hidden>
  • Date: Sat, 23 Feb 2013 14:41:28 -0500

On Feb 23, 2013, at 1:35 PM, Keary Suska <email@hidden> wrote:

> Your description suggests that you aren't using separate UI elements for the window and the popover as required by the docs...?


When I said "I am instantiating separate controllers and views for the anchored popover and the detached popover as per the documentation," I meant that I alloc and init separate view controllers for the anchored popover and for the detached popover window. The anchored popover has one view controller. The new view controller for the detached popover window initializes itself by loading the nib file for the view, and I assign the new view as the content view of the new popover window. I believe that results in separate UI elements for the popover and the window. I even have to explicitly set the values in the new UI elements to match the values they had in the anchored popover -- otherwise, the new UI elements are empty.

The only substantive difference between my application and Apple's Popover sample code is that Apple instantiates both popover view controllers in the mainmenu nib file, both of them based on the same NSView subclass. I instantiate my two popover view controllers separately in code, both of them based on the same NSView subclass. I instantiate the new detached popover window's view controller lazily in the -detachableWindowForPopover: delegate method. My way, if the user never creates a detached popover window by dragging the anchored popover away from the parent window, I never have to create its view controller and view.

Did I understand you correctly?

--

Bill Cheeseman - email@hidden



--

Bill Cheeseman - email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >Problem with NSDatePicker in popover (From: "William J. Cheeseman" <email@hidden>)

  • Prev by Date: Re: NSFileManager createDirectory… confusing docs.
  • Next by Date: Re: Problem with NSDatePicker in popover
  • Previous by thread: Problem with NSDatePicker in popover
  • Next by thread: Re: Problem with NSDatePicker in popover
  • Index(es):
    • Date
    • Thread