You shouldn't be doing any drawing in awakeFromNib. See this example code:
http://developer.apple.com/mac/library/samplecode/RoundTransparentWindow/index.html
It demonstrates how to create and display a custom window using an NSWindow
subclass.
On 2010-02-14, at 10:36 PM, Sandro Noël wrote:
Ok I know I must be missing something dumb.
i'm trying to draw borders for the window,
- (void) awakeFromNib{
[window setStyleMask:NSBorderlessWindowMask];
[window setOpaque:YES];
NSDrawNinePartImage([[window contentView]frame],
Sandro Noël (sandro.n...@gestosoft.com) on 2010-02-15 00:36 said:
- (void) awakeFromNib{
[window setStyleMask:NSBorderlessWindowMask];
[window setOpaque:YES];
NSDrawNinePartImage([[window contentView]frame],
You should be drawing from drawRect:, not awakeFromNib.
On 15/02/2010, at 4:36 PM, Sandro Noël wrote:
- (void) awakeFromNib{
NSDrawNinePartImage([[window contentView]frame],
nil,
nil,
You should be drawing from drawRect:, not awakeFromNib.
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/
CocoaDrawingGuide/Introduction/Introduction.html
Also, IIRC, you can only make a window borderless at init time.
Are you trying to make a custom window?