Re: Question regarding popoverControllerDidDismissPopover: delegate method
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