• 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: Question regarding popoverControllerDidDismissPopover: delegate method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question regarding popoverControllerDidDismissPopover: delegate method


  • Subject: Re: Question regarding popoverControllerDidDismissPopover: delegate method
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 6 Jan 2011 08:00:20 -0800

On Wed, 5 Jan 2011 17:20:19 -0800, Jon Brooks <email@hidden> said:
>
>The problem comes if a user simultaneously  taps both an item in the popover, and outside the popover.  In this case, I first get the delegate, popoverControllerDidDismissPopover: which is fielding the tap outside the popover, followed by my method responding to the touch inside the popover, which tries to dismiss an already dismissed popover.
>
>Is this a bug that the popover is still fielding a touch after the delegate method popoverControllerDidDismissPopover: is called?
>

No one knows whether it's a bug except Apple, and they're not telling. I suggest you file it as a bug, however. (On the other hand, the whole management of popovers - or lack thereof - is one giant bug in this programmer's humble opinion.)

Still, if you're maintaining an instance variable pointing to the current popover controller, you should be fine, because if the popover has been dismissed, that instance variable will be nil (because you set it to nil when you dismiss the popover or when you hear that the popover has been dismissed). So you can check whether it *is* nil before doing anything, plus, sending it a message telling it to dismiss its popover will do no harm.

m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________

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

  • Prev by Date: Re: execute system("some script") on behalf of root from non-root app
  • Next by Date: Re: execute system("some script") on behalf of root from non-root app
  • Previous by thread: Question regarding popoverControllerDidDismissPopover: delegate method
  • Next by thread: [UIWeVview] goBack:/goForward:
  • Index(es):
    • Date
    • Thread