Re: Newbie Question: Controls not redrawing on changes
Re: Newbie Question: Controls not redrawing on changes
- Subject: Re: Newbie Question: Controls not redrawing on changes
- From: "Michael Ash" <email@hidden>
- Date: Sat, 3 May 2008 18:25:28 -0400
On Sat, May 3, 2008 at 5:42 PM, Christopher Kempke
<email@hidden> wrote:
> Here's some random clips from my code. The Windows for my (modal) dialog
> are are created by:
>
> theWindow = [[NSWindow alloc]
> initWithContentRect:*(NSRect*)&platRect styleMask:winStyleMask &~
> (NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
> backing:NSBackingStoreRetained defer:YES];
You should basically never use any backing store type other than
NSBackingStoreBuffered. The other types exist for extremely
specialized uses and they don't play well with nearly anything. I
wouldn't be surprised if Cocoa controls assumed they were in a
buffered window and this was the cause of your problem.
I know that you're stuck doing it this way due to the nature of what
you're creating, but the reason you're finding the easy things hard is
because the easy way is to use IB. Although you probably can't use it
for what you're doing, some practice sessions with IB or some
compare-and-contrast between the objects IB produces and the objects
you're producing yourself would help reveal the problem in this sort
of situation.
Mike
_______________________________________________
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