• 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: custom view won't update
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom view won't update


  • Subject: Re: custom view won't update
  • From: "Shawn Erickson" <email@hidden>
  • Date: Thu, 13 Sep 2007 10:52:01 -0700

On 9/13/07, H M <email@hidden> wrote:
> > It seems a little strange that an NSView subclass has IBActions/
> > IBOutlets... yet the above code seems to imply that.
>
> I can put those actions into a controller class (already there) but
> then how do I send a setNeedsDisplay message to my view?
>
> The custom class is called Sky, so I tried [Sky setNeedsDisplay:YES],
> and when I built the project, I got a warning: "Sky might not respond
> to setNeedsDisplay" or something along those lines.

Your controller class needs an ivar (instance variable) that points at
your view (or a way to get a reference to the view). Likely your ivar
would be an IBOutlet that you could then control-drag from your
controller object and connect to your view object in the nib.

-Shawn
_______________________________________________

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: 
 >custom view won't update (From: H M <email@hidden>)
 >Re: custom view won't update (From: Shawn Erickson <email@hidden>)
 >Re: custom view won't update (From: H M <email@hidden>)
 >Re: custom view won't update (From: "I. Savant" <email@hidden>)
 >Re: custom view won't update (From: H M <email@hidden>)
 >Re: custom view won't update (From: Shawn Erickson <email@hidden>)
 >Re: custom view won't update (From: H M <email@hidden>)

  • Prev by Date: addTrackingRect
  • Next by Date: Re: resetting ivars safely
  • Previous by thread: Re: custom view won't update
  • Next by thread: Re: custom view won't update
  • Index(es):
    • Date
    • Thread