• 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: Clicking Dock Icon creates a new window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clicking Dock Icon creates a new window


  • Subject: Re: Clicking Dock Icon creates a new window
  • From: Denis Defreyne <email@hidden>
  • Date: Sat, 13 Mar 2004 15:33:44 +0100

On Mar 13, 2004, at 3:27 AM, Bruce Truax wrote:

> When I bring my Document based application to the front by clicking on
> the
> dock icon it always spawns a new window. How can I disable this
> behavior?

Make an application delegate, if you haven't got one yet. Then make -
(BOOL)applicationShouldOpenUntitledFile:(NSApplication *)theApplication
return NO.

Making an application delegate is quite simple... make a new
MyAppDelegate class, read the MyAppDelegate.h file in the MainMenu.nib
file in Interface Builder, instantiate MyAppDelegate, and connect the
First Responder to the new MyAppDelegate instance.

Denis Defreyne

--
mail: email@hidden
web: http://amonre.bedesign.be/
_______________________________________________
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.


References: 
 >Clicking Dock Icon creates a new window (From: Bruce Truax <email@hidden>)

  • Prev by Date: Re: Clicking Dock Icon creates a new window
  • Next by Date: Re: Leave NSLog()s in Final Product?
  • Previous by thread: Re: Clicking Dock Icon creates a new window
  • Next by thread: Re: Clicking Dock Icon creates a new window
  • Index(es):
    • Date
    • Thread