In the online document "Managing the Keyboard" under the heading "Moving 
Content That is Located Under the Keyboard" 

There is some nifty code listings 

Listing 4-1  Handling the keyboard notifications
Listing 4-2  Additional methods for tracking the active text field.

AND there is some explanation that I mostly follow and have implemented some of 
the code.  

HOWEVER - I get a compile error on "activeField" 
The doc says 
"The active field is stored in a custom variable (called activeField in this 
example) that is a member variable of the view controller and set in the 
textFieldDidBeginEditing: delegate method, which is itself shown in Listing 
4-2."

OK OK This is where my knowledge of Objective C breaks down and is lacking.  

When I drop in code listing 4-1, I get a precompile error on activeField as 
"Use of undeclared identifier 'activeField' "

Looking at the 4-2 code I assume that "activeField" is of type (UITextField *) 
AND the  doc statement that its a custom variable that is a member variable of 
the view controller 
MEANS that I should declare the activeField as a @property in the 
ViewController interface 

@property (UITextField *) activeField;

BUT this yields the following 2 pre-compile errors
1) Unknown property attribute 'UITextField'
2)Type name requires a specifier or qualifier

Clearly I am yet again lost...

Please advise.

Thanks

YT


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to