• 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: get a window in front by clicking on a menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get a window in front by clicking on a menu item


  • Subject: Re: get a window in front by clicking on a menu item
  • From: Martin Batholdy <email@hidden>
  • Date: Fri, 5 Jun 2009 21:52:28 +0200

If you create your menuHandler in awakeFromNib, how can you connect it to the window in IB? It not there when you try to connect the outlet.

You seem to connect to another / a wrong menuHandler instance.

Yeah ... I think that is what is going wrong;

what I know is, that the method (showWindow:) gets called
(did make that sure by adding NSLog-messages) -
but it does not interact with the window.


but ... how would you do the connections to the window properly?

Do I have to connect the window in the IB with the AppController?
But than ... the MenuHandler don't know nothing about the window ...

And how can I say the menuItem in menuHandler to use an existing instance of an AppController Object?
(with setTarget: ...) ..


I am pretty new to object-oriented programming.

So I don't really know how you can say a menuItem;
hey, there is an instance of an object that created you, and this also have connection to an existing window; now go to the openWindow method when someone clicks on you and get that damn window in front...
(is that the way it should work ..?)








Am 05.06.2009 um 20:54 schrieb Alexander Spohr:

Ah, wait!

Am 05.06.2009 um 18:03 schrieb Martin Batholdy:

My AppController [...] creates an instance of it in the awakeFromNib function.

[...]

I have created a window in the Interface Builder and have connected it with an IBOutlet NSWindow variable in the MenuHandler.

If you create your menuHandler in awakeFromNib, how can you connect it to the window in IB? It not there when you try to connect the outlet.


You seem to connect to another / a wrong menuHandler instance.


atze


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: get a window in front by clicking on a menu item
      • From: Alexander Spohr <email@hidden>
References: 
 >get a window in front by clicking on a menu item (From: Martin Batholdy <email@hidden>)
 >Re: get a window in front by clicking on a menu item (From: Alexander Spohr <email@hidden>)
 >Re: get a window in front by clicking on a menu item (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: XIB and AppleGlot
  • Next by Date: Re: Snow leopard cocoa application with setgid launching problem
  • Previous by thread: Re: get a window in front by clicking on a menu item
  • Next by thread: Re: get a window in front by clicking on a menu item
  • Index(es):
    • Date
    • Thread