• 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: Easy, stupid question about window delegates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy, stupid question about window delegates


  • Subject: Re: Easy, stupid question about window delegates
  • From: Oscar Morales Vivó <email@hidden>
  • Date: Fri, 12 Apr 2002 15:09:00 +0200

An easy one...

if sender is the button, just do [sender window] to get the window it is contained in.

Hope that helped...


On Friday, April 12, 2002, at 02:58 PM, Martin-Gilles Lavoie wrote:

I have a window. it had two edit fields, and a button. Think of a login screen.

This window has a window delegate, and fields are properly mapped to this delegate's data members, and the button connected to an action.

I confirmed everything is working right while stepping the code.

Now, if the process (logging into my db) succeeds, I need to close this window.

But, the sender passed on to the delegate is the NSButton in my window.

How do I gain access to the window object to close it?


+-----------------------------------------------------------------------+
| Martin-Gilles Lavoie Mac OS X Wing Fighter |
| mailto:email@hidden http://www.steltor.com/ |
+-----------------------------------------------------------------------+

_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
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.

  • Prev by Date: NSImage -isValid not always right?
  • Next by Date: Re: NSThread/NSMutableArray oddity
  • Previous by thread: Problems with image cell in table view (was: Re: NSImage -isValid not always right?)
  • Next by thread: System Prefs
  • Index(es):
    • Date
    • Thread