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, 12:34 AM   #1 (permalink)
dab
New Member
 
Join Date: Apr 2009
Posts: 7
Default random text generator

Hi, I am a real newbie to programming on iphones. What I am trying to do is basically make a joke app for a school project. It starts with a navigation based interface, for categories of jokes. Once you tap a category, it goes to a view with a label and a button. You tap the button to randomly pick and display a joke (from a text file or something like that).
Because i am very new to this, though, I have mostly been making my app out of tutorials. I already have made my navigation based app; with subviews and all. Tapping a subview gets a view with one round button and a label. However, I have not yet set up the whole random part.

Right now, when I tap the button, it says "set by [whichever category it is in]" because the tutorial (noob, I know) said I should put a code to make it access global application data. I'm still not sure if I need this for my app, I have a feeling it would actually mess it up.

My questions:
Where and how do I construct my text file with all the jokes for a certain category?
What is the code to make it randomly pick a joke from the text, and where do I insert this code?
Do I need the global application data accessing code?

Thanks a whole, whole lot.
dab is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,842
Threads: 89,211
Posts: 380,651
Top Poster: BrianSlick (7,129)
Welcome to our newest member, immortalkenny
Powered by vBadvanced CMPS v3.1.0

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