Avoid closing of the window when user hits cmd+w keys.


hi all,

developing mac application. , in 1 of use cases, prompt window ok button. want user respond ok button on window close window.
have unchecked "close" option in xib disables close option in ui.

if user hit "command + w" key when window has focus, window closes.
there way can ignore command window remains opened?

tried implementing "windowshouldclose" delegate method, found method not called @ all. documentation says method not reliable.
 

hi

might better response posting in mac programming section.

i'm no expert, assuming window normal nspanel or nswindow need deselect "close" shown in screenshot.
 

attached files:



Forums Macs Mac Apps and Mac App Store


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

OS X El Capitan on Unsupported Macs

[SOLVED] SFOTT usb key not bootable Mavericks

Fernando Torres: One of the all-time greats?