after you close a window, why is "new" grayed out in menu?

I'm trying to figure out how these stock menus and menu items work. They seem to be controlled by some hidden code somewhere.

If someone closes the app's main window, for whatever reason... you would want to present them with the opportunity to open a new window. But the "new" menu item is grayed out after the close is performed... and I can't figure out where the code for that is coming from or how I can alter it. Also, is there a way I can see the code for things like save, open, save as, revert to saved, etc.? Thanks for the help.

the "new" menu item is grayed out after the close is performed

Can you explain what sort of app you have created?
Have you defined an action for the new menu ?

Check also if autoEnable is ON or off
In IB
  • select File menu

  • select Menu item inside

  • check autoenable in Attributes inspector

  • turn Off

I think I have figured it out. In the stock out of the box macOS app, when you close the window... it gets deallocated. So you can't create a "new" one. I started reading the Window Programming Guide... so I'm slowly figuring it out. Thank you!!!
after you close a window, why is "new" grayed out in menu?
 
 
Q