Re: Object not being drawn in Cmd + N window. Why?
Re: Object not being drawn in Cmd + N window. Why?
- Subject: Re: Object not being drawn in Cmd + N window. Why?
- From: Mike Abdullah <email@hidden>
- Date: Thu, 25 Oct 2012 22:40:17 +0100
Presumably your NSView subclass implements -drawRect:
Is this being called at all for you non-drawing view?
If it is being called, is there anything weird about the view or environment at the time?
What triggers do you have to cause the view to be redrawn?
On 25 Oct 2012, at 21:16, Peter Teeson <email@hidden> wrote:
> Xcode 4.5.1 Lion 10.7.4
> I have desktop Document project with a sub-class of NSView. Debug only version as of now.
> The Window has 2 instances of this sub-class (basically squares that have gradients);
> The only difference between the two instances are the start and stop mid points for the gradients.
>
> When I Run it to debug, a Document window opens and behaves as I expect.
> In particular both instances of the sub-class are drawn in the window.
>
> The Problem:
> But when I Cmd + N to get a new document then only one of the sub-class objects is drawn.
> The one that is not drawn is the second instance I added yesterday.
> As I said the only difference between the two instances is the value of an ivar (which I set
> appropriately in Document.m awakeFromNib.)
>
> My efforts to track this down have failed and I lack understanding how this could happen.
> After all they are using the same nib (xib). And indeed the value of each pointer to the instances
> are not zero. And the various ivars are correctly initialized.
>
> The Questions:
> How could this happen? How can I try to track it down?
>
> TIA & respect…
> Peter
>
> P.S. I first posted this to the Xcode list but was advised to post here instead.
> _______________________________________________
>
> 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