Welcome, Guest
Username Password: Remember me

ImagePicker throws exception on iPad (SOLVED!)
(1 viewing) (1) Guest

TOPIC: ImagePicker throws exception on iPad (SOLVED!)

ImagePicker throws exception on iPad (SOLVED!) 1 year, 7 months ago #1

I have changed one of the cells bound to my coredata entity from TextFieldCell to ImagePicker with the fiollowing prperty def:
SCPropertyDefinition *coverImagePropertyDef = [projectDef propertyDefinitionWithName:@"CoverImagePath"];
coverImagePropertyDef.title = @"Cover Image File";
coverImagePropertyDef.type = SCPropertyTypeImagePicker;
After building without warnings, I load and run in the simulator and when the cell in question is clicked I get these messages:
2010-10-16 09:18:54.363 PubWriter[6987:207] Using two-stage rotation animation. To use the smoother single-stage animation, this application 
must remove two-stage method implementations.
2010-10-16 09:18:54.364 PubWriter[6987:207] Using two-stage rotation animation is not supported when
rotating more than one view controller or view controllers not the window delegate
2010-10-16 09:18:54.414 PubWriter[6987:207] sqlite error 14 [unable to open database file]
2010-10-16 09:18:54.415 PubWriter[6987:207] sqlite error 21 [unable to open database file]
 
and then this exception is thrown:
2010-10-16 09:18:54.422 PubWriter[6987:207] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: 'On iPad, UIImagePickerController must be presented via UIPopoverController'
2010-10-16 09:18:54.423 PubWriter[6987:207] Stack: (
44505168,
45663020,
5314194,
192794834,
3516113,
3515571,
3509742,
3509513,
3476194,
5740606,
5739170,
3968929,
5303434,
73496854,
73496101,
73439698,
73439026,
73639654,
43993682,
43782981,
43780264,
53491869,
53492066,
3355506,
10594,
10466
)
terminate called after throwing an instance of 'NSException'
I am using the iOS 4.0 SDK and building to iPad 3.2, using STV 1.6
  • Geoffrey
  • OFFLINE
  • Senior Boarder
  • Posts: 48
  • Karma: 3
Last Edit: 1 year, 5 months ago by tarekskr.

Re: ImagePicker throws exception on iPad 1 year, 7 months ago #2

Thanks a lot Geoffrey for reporting this. We'll fix it and send you an update ASAP.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: ImagePicker throws exception on iPad 1 year, 7 months ago #3

Dear Geoffrey,

Please tell me if the update I just sent you fixed the problem. Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: ImagePicker throws exception on iPad 1 year, 7 months ago #4

Almost! The popover, picker, and image detailview work beautifully, but when I navigate back out of the detailview of the entity, the change to the imagePicker cell is not committed to the managed object, and disappears; all the other cells bound to the entity work ok as before

It seems there are some new issues with the entity changes committing, if I add an image with the picker when I add a new object entity, and click done, the entire entity doesn't save. When I create an object, add other data except for an image, save, it works ok. Changes to the image picker cell do not save at all.

Thanks for looking into this so quick.
  • Geoffrey
  • OFFLINE
  • Senior Boarder
  • Posts: 48
  • Karma: 3
Last Edit: 1 year, 7 months ago by Geoffrey.

Re: ImagePicker throws exception on iPad 1 year, 7 months ago #5

Thanks a lot Geoffrey, we've actually discovered that too during our more thorough testing. The issue is now fixed, will send you the update right away. Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: ImagePicker throws exception on iPad 1 year, 7 months ago #6

Thanks! One last question to make it work the way I need it to -- I need to add an edit button to the toolbar the cell as an accessory so the user can make a selection more than once (so when the cell is selected, the picker comes up again and not the detail view), so thew user can change an existing selection that is. Would I add this in the willDisplayCell delegate? can you point me in the right direction?
  • Geoffrey
  • OFFLINE
  • Senior Boarder
  • Posts: 48
  • Karma: 3
Last Edit: 1 year, 7 months ago by Geoffrey.
Time to create page: 1.87 seconds