• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Can't make window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Can't make window.
      • From: Steve <email@hidden>
References: 
 >Can't make window. (From: Steve <email@hidden>)

  • Prev by Date: Re: iCal calendar parser
  • Next by Date: Re: Weird Obj-c runtime problems
  • Previous by thread: Re: Can't make window.
  • Next by thread: Re: Can't make window.
  • Index(es):
    • Date
    • Thread