• 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 seem to get any delegate messages with NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can seem to get any delegate messages with NSWindow


  • Subject: Re: Can seem to get any delegate messages with NSWindow
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 20 Jul 2007 13:07:02 -0700
  • Thread-topic: Can seem to get any delegate messages with NSWindow

On Thu, 19 Jul 2007 17:56:20 -0600, Rick Meier <email@hidden>
said:
>I have created a window programatically using:
>
> NSRect5 rect = ...
> NSWindow  *pWin = [[NSWindow alloc] initWithContentRect:rect
>              styleMask:NSBorderlessWindowMask
>                backing:NSBackingStoreBuffered
>               defer:NO];
> [pWin setDelegate:delegate];
>
>
>I have a - (BOOL)windowShouldClose:(id)sender; method in my delegate.
>
>I call [pWin performClose:self] from a view inside of the window but
>the delegate never gets called.
>
>I have checked the delegate with [pWin delegate] and it is set to my
>object.
>
>Do I need to do something to my window so that the messages will be
>sent/received.
>
>This app does not have a NIB (and will not) so I have to do it
>programmatically.
>
>Any ideas?

A borderless window has no close button, so you cannot tell it to
performClose. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

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

  • Prev by Date: Re: Newbie Question: Why would my App freeze when I select a row inan NSTableView? - Found word(s) Re: in the subject
  • Next by Date: Re: NSAppleScript behaving strange
  • Previous by thread: Can seem to get any delegate messages with NSWindow
  • Next by thread: NSArrayController content array vs arrangedObjects
  • Index(es):
    • Date
    • Thread