• 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
Re: The Documentation says "that is a member variable" SOLVED
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Documentation says "that is a member variable" SOLVED


  • Subject: Re: The Documentation says "that is a member variable" SOLVED
  • From: YT <email@hidden>
  • Date: Thu, 04 Jul 2013 18:11:59 -0700

OH good grief - I've been at my terminal too long -

The declaration syntax is just wrong

WRONG:     @property (UITextField *) activeField;

CORRECT: @property UITextField * activeField;

Sorry for the bother <shaking head and thinking go take a break>

YT


On Jul 4, 2013, at 5:41 PM, YT <email@hidden> wrote:

> 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



_______________________________________________

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


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

  • Prev by Date: The Documentation says "that is a member variable"
  • Next by Date: Javascript call function Objective-C
  • Previous by thread: The Documentation says "that is a member variable"
  • Next by thread: NSOpenPanel not properly validating/updating with respect to allowedFileTypes
  • Index(es):
    • Date
    • Thread