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 02-08-2009, 08:36 PM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 7
craign is on a distinguished road
Question Text field help!

Total noob here, just getting used to the iPhone SDK. I've programmed on the Palm, on Windows CE, and just finished a tome on Objective C, and am now going through "Beginning iPhone Development" by Mark & LaMarche. I happily made my "hello world" program, made a program that displays text on the bottom of the screen when either of two buttons are pressed, and am now stuck on text fields. A la the instructions in the book, I added this code to the view controller.h file:

@interface Control_FunViewController : UIViewController {
IBOutlet UITextField *nameField;
IBOutlet UITextField *numberField;
}
@property ( nonatomic, retain ) UITextField *nameField;
@property ( nonatomic, retain ) UITextField *numberField;
@end

and to the implementation file:

@implementation Control_FunViewController
@synthesize nameField;
@synthesize numberField;
...

And then added 2 text boxes to the view in the interface builder. I connected each text box by control dragging from File's Owner in the interface builder box to the appropriate text view boxes in the view, and selected the appropriate UITextField object. The program compiles and runs just fine, but when I click in the text fields, nothing happens. The book tells me the keyboard should automagically pop up, but it does not.

Any idea what I'm missing? Is there an action I need to invoke? A method I need to include?

Many, many TIA in advance, I've been banging my head against the wall for a couple of hours now. My application set is fairly text field dependent.

Craig
craign is offline   Reply With Quote
Old 02-08-2009, 08:54 PM   #2 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 7
craign is on a distinguished road
Default Figured it out

Just figured it out--it turns out the book has a form at iphonedevbook.com • Index page and the answer was there (sorry).

I had inadvertently unclicked the User Interaction Enabled checkbox for the main view in the interface builder. I don't remember doing that--but I do remember doing it for the text fields. So either I'm an idiot (likely) and unclicked it by accident, or when unclicking it for a text box it unclicked it for the main view (unlikely, but possible).
craign is offline   Reply With Quote
Old 02-08-2009, 08:56 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 7
craign is on a distinguished road
Default Oops

Quote:
Originally Posted by craign View Post
Just figured it out--it turns out the book has a form at iphonedevbook.com • Index page and the answer was there (sorry).

I had inadvertently unclicked the User Interaction Enabled checkbox for the main view in the interface builder. I don't remember doing that--but I do remember doing it for the text fields. So either I'm an idiot (likely) and unclicked it by accident, or when unclicking it for a text box it unclicked it for the main view (unlikely, but possible).
Arrrgh, so sorry about the multiple posts--I unclicked the User Interaction Enabled check box for the *labels* not the text fields!
craign is offline   Reply With Quote
Reply

Bookmarks

Tags
newbie, text field

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: 323
5 members and 318 guests
Anwerbl, guusleijsten, HowEver, LEARN2MAKE, mottdog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,879
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 08:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0