• 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: [newbie]How to pop a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie]How to pop a window?


  • Subject: Re: [newbie]How to pop a window?
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 8 Jul 2006 12:41:37 +0200

Am 08.07.2006 um 06:26 schrieb Bus Mini:
Thanks for you advice. Now suppose I have two windows created in nib, one is the main window which was showed when app started, another is the one I want it to poped up when I click a button in main window.

And the followed code was called when the button was clicked,

IBOutlet NSWindow *myWindow;

You *have* hooked up this outlet in IB, have you?

.............
[myWindow showWindows]   //this doesn't work

Of course not. myWindow is an NSWindow, showWindows is a method on NSDocument. It's like telling a skating rink to fly :-S


[myWindow display] //this doesn't work either

Check out the docs. Display is for redrawing a window that's already visible, not for actually showing it.


[myWindow print:self];//this doesn't work either
[myWindow makeKeyAndOrderFront:nil];//this doesn't work either

These two *should* work.

Must I set something special?

Do you have a good book on Cocoa? I strongly suggest you get Aaron Hillegass's "Cocoa Programming for Mac OS X (2nd ed.)". It will walk you through all the basics.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: [newbie]How to pop a window?
      • From: "Bus Mini" <email@hidden>
References: 
 >[newbie]How to pop a window? (From: "Bus Mini" <email@hidden>)
 >Re: [newbie]How to pop a window? (From: Uli Kusterer <email@hidden>)
 >Re: [newbie]How to pop a window? (From: "Bus Mini" <email@hidden>)

  • Prev by Date: Re: How do I display RTF Data?
  • Next by Date: Re: iPhoto integration?
  • Previous by thread: Re: [newbie]How to pop a window?
  • Next by thread: Re: [newbie]How to pop a window?
  • Index(es):
    • Date
    • Thread