Exception on selecting photo from popoover


#1

I implemented the popover (just the first part) as explained in the book. The popover appears, shows photos etc. but as soon as I select one I get an exception

I tried running under iphone simulator, and it works fine.

Strange - thought i’d done something wrong, but then I downloaded the solutions from website, and ran chapter 13 solution, with exactly the same results. As soon as I select a photo, I get an exception that it’s trying to insert a nil value. But only on ipad version. Any ideas?


#2

I’ve traced my program and the problem is in popoverControllerDidDismissPopover

that works, and if I step through I can see image having a value.

as soon as I hit the next line CFUUIDRef newUniqueID = CFUUIDCreate (kCFAllocatorDefault); image is nilled. No idea why. Anyone?

If i run same trace in iPhone simulator, it breezes past that line…
(I’m testing this all in the sample code to make sure it’s not something silly I’ve done…)


#3

and I should have tried this first. deleted app from simulator, cleaned project and re-started xcode and now it’s working fine.

weird!