Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-03-2009, 06:34 PM   #1 (permalink)
Registered Member
 
malcom's Avatar
 
Join Date: Aug 2008
Posts: 29
malcom is on a distinguished road
Send a message via AIM to malcom
Default Crash when loading TTPhotoViewController

Hello, I've successfully implemented TTThumbsViewController.
Now I would to open a TTPhotoViewController in order to browse my photo.
Below the code I've used (it's called when users click a row in a normal UITableView)
Everything works fine but when the single image loads app crashes with this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument'

This is the stack frame image:
Imageshack - screenshot20091004at130

Any idea?
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
 	BMWStandardTableCell *cell = ((BMWStandardTableCell*)[tableView cellForRowAtIndexPath:indexPath]);	
	// Display the updated photoSource.
	[_photoshource release];
	[thumbs_controller release];
	
	_photoshource = [[self dataSourceForList: [_x_fetcher galleryForTitle:cell.fld_line1.text]
								  withTitle: cell.fld_line1.text] retain];
	thumbs_controller = [[TTThumbsViewController alloc] init];
    [thumbs_controller setPhotoSource:_photoshource];
	thumbs_controller.delegate = self;
	[self.navigationController pushViewController:thumbs_controller animated:YES]; 

	[tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)thumbsViewController:(TTThumbsViewController*)controller didSelectPhoto:(id<TTPhoto>)photo {
	[_photocontroller release];
	_photocontroller = [[controller createPhotoViewController] retain]; 
	_photocontroller.centerPhoto = photo; 
	[self.navigationController pushViewController:_photocontroller animated:YES]; 
}

- (MockPhotoSource *) dataSourceForList:(NSArray *) _array withTitle:(NSString *) _ptitle {
	NSMutableArray *_list = [[NSMutableArray alloc] init];

	[_list addObject: [[[MockPhoto alloc]
      initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0"
      smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg"
						size:CGSizeMake(320, 480)] autorelease]];
	/*
	for (BMWGalleryResource *gItem in _array) {
		NSString *_galleryURL = [NSString stringWithFormat:kGalleryThumbURLFormat,gItem.p_photoID_link];
		MockPhoto *_photo = [[[MockPhoto alloc] initWithURL: _galleryURL
											   smallURL: _galleryURL
												   size:CGSizeMake(960, 1280)] autorelease];
		[_photo setCaption:@"merda"];
		
		[_list addObject:_photo];
		[_photo release];
	}*/
	MockPhotoSource *source= [[MockPhotoSource alloc] initWithType:MockPhotoSourceNormal
															 title:_ptitle
															photos:_list
														   photos2:_list];
	[_list release];
	return [source autorelease];
}
malcom is offline   Reply With Quote
Old 03-04-2010, 09:20 AM   #2 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 1
Azira is on a distinguished road
Default

I've got a similar problem. Did you find a solution, or what caused the problem?
Azira is offline   Reply With Quote
Old 09-13-2010, 04:29 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 1
ar1013arun is on a distinguished road
Default Three20 crashing..

You might not have added Three20.bundle..that too will create the same kind of problem !!!
ar1013arun is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 347
10 members and 337 guests
givensur, glenn_sayers, guusleijsten, ipodphone, jbro, mediaspree, mtl_tech_guy, Punkjumper, whitey99, yys
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:34 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0