• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
The Documentation says "that is a member variable"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The Documentation says "that is a member variable"


  • Subject: The Documentation says "that is a member variable"
  • From: YT <email@hidden>
  • Date: Thu, 04 Jul 2013 17:41:56 -0700

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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: The Documentation says "that is a member variable" SOLVED
      • From: YT <email@hidden>
References: 
 >Re: Moving a textField from under keyboard (From: Esteban Torres <email@hidden>)

  • Prev by Date: Re: Changing Text Field Color to Custom Color in IB
  • Next by Date: Re: The Documentation says "that is a member variable" SOLVED
  • Previous by thread: Re: Moving a textField from under keyboard
  • Next by thread: Re: The Documentation says "that is a member variable" SOLVED
  • Index(es):
    • Date
    • Thread