Re: custom view won't update
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