RE: Can't make window.
RE: Can't make window.
- Subject: RE: Can't make window.
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Mon, 10 Feb 2003 15:22:25 -0500
You've completely munged the method call and you haven't allocated memory
for the window. Try:
NSWindow *wind = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES];
Objective C requires that you include the labels of the arguments in the
method call. They are actually part of the method signature (and they make
it a hell of a lot easier to maintain your code). Also, Booleans are YES
and NO, not true/false.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Steve
>
Sent: Monday, February 10, 2003 1:19 PM
>
To: email@hidden
>
Subject: Can't make window.
>
>
>
Thanks for the help in creating a custom window.
>
>
Heh, heh, typing code to make windows, just like the good old days!
>
>
But what's wrong with this (unknown message selector):
>
------------------
>
NSRect rect = NSMakeRect(20, 20, 200, 200);
>
NSWindow *wind;
>
[wind
>
initWithContentRect:rect:NSBorderlessWindowMask:NSBackingStoreBuffered:t
>
rue];
>
>
--------------
>
>
The documentation says:
>
>
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned
>
int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.