• 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: Shawn Erickson <email@hidden>
  • Date: Sat, 08 Jul 2006 09:27:08 -0700


On Jul 8, 2006, at 7:44 AM, Bus Mini wrote:

I did connect *IBOutlet NSWindow *myWindow *to the window which was created
in nib.


and the followed code is the exactly method was called when a button was
cilcked


- (IBAction)startToWork:(id)sender
{
  [myWindow makeKeyAndOrderFront:self];
}
It doesn't work.

Ok..
Are you 100% sure your myWindow outlet is correctly connected in the nib?
Do you have any methods called myWindow or setMyWindow: in your class?
Are you sure startToWork: is getting called?
When is startToWork: getting called?


Try adding the following to your class and see if your window pops up...

- (void) awakeFromNib {
	[ myWindow makeKeyAndOrderFron:self];
}

... if it does pop up then make sure to review ...

<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Protocols/NSNibAwaking_Protocol/Reference/Reference.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/ LoadingResources/index.html>


-Shawn

_______________________________________________
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


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>)
 >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: Getting a bundle to load symbols from the main app bundle
  • Next by Date: Out-of-order Undos and NSTextField
  • Previous by thread: Re: How to pop a window?
  • Next by thread: Re: [newbie]How to pop a window?
  • Index(es):
    • Date
    • Thread