• 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: Warning in error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning in error


  • Subject: Re: Warning in error
  • From: Charlie Dickman <email@hidden>
  • Date: Tue, 22 Dec 2009 17:36:18 -0500

Bill, Hank & Wyatt,

Thanks so much. You have explained it to me in a way that I can understand.

With apologies to those who would lecture me that this is not an xcode topic (don't read it if it offends you)...

As to the correctness of the code, I'm experienced with Xcode for programming on the Mac but this is my first attempt on the iPhone. On the Mac I'm used to putting things like views and their controllers, delegates, etc. in the same xib/nib but on the iPhone with it's view/controller/data paradigm these things end up in different nib's so I can't link the view and its controller as I would in a Mac app. So I wouldn't be surprised if there's a better, more correct way to do what I'm doing.

On Dec 22, 2009, at 1:47 PM, Bill Bumgarner wrote:


On Dec 22, 2009, at 10:24 AM, Charlie Dickman wrote:

[[self view] setController: self];

This last line gets flagged with "UIView may not respond to setController. Even if I explicitly declare "setController" in the MyView.h file I still get the erroneous warning and, yes, I have #import'ed the .h file.

-view is declared as returning (UIView*), not (MyView *).  Fix the method declaration or, if it is a 'kit method, cast the return of -view.

Though, in general, if you are typecasting the return value of a 'kit method, it is often because your code is incorrect.  Not always, but often.

b.bum


Charlie Dickman
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Warning in error
      • From: Sherm Pendley <email@hidden>
References: 
 >Warning in error (From: Charlie Dickman <email@hidden>)
 >Re: Warning in error (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: #pragma
  • Next by Date: Re: Warning in error
  • Previous by thread: Re: Warning in error
  • Next by thread: Re: Warning in error
  • Index(es):
    • Date
    • Thread