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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-26-2009, 06:38 PM   #6 (permalink)
brandon0104
Registered Member
iPhone Dev SDK Supporter
 
Join Date: Oct 2008
Posts: 10
Default

First, you cant have multiple definitions of the same method. OnButtonClick is defined twice, you need to combine the two methods. I'll get to that later.
fileContents is an NSString and needs to be declared in your Header file.


Code:
NSString *fileContents;
or if you dont plan on using it in more than one method you dont have to, just add NSString *fileContents = blah blah blah...


You didn't quite finish. You renamed categoryDic, "elevatorJokes" but didn't change it in [categoryDic valueForKey...

Same with your NSMutableArray eleJokes. [items count]; should be [eleJokes count];

[sillyJokes objectAtIndex:randomNumber]; needs to be [eleJokes objectAtIndex:randomNumber];

Now, copy every inside your second OnButtonClick. Paste it inside the first one.

Delete the displayString line.

And edit [appDelegate setModelData:displayString]; to

Code:
[appDelegate setModelData:joke];

I think that about takes care of it...

Also, you will want to give your variables more meaningful names. Such as elevatorJokesDict or eleJokesMutArray. That way in the future you actually know what they are.

Last edited by brandon0104; 04-26-2009 at 07:56 PM.
brandon0104 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,808
Threads: 89,206
Posts: 380,628
Top Poster: BrianSlick (7,129)
Welcome to our newest member, kaileymo123
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:34 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.