Re: Auto enable/disable buttons...
Re: Auto enable/disable buttons...
- Subject: Re: Auto enable/disable buttons...
- From: Mario Diana <email@hidden>
- Date: Tue, 20 Jul 2004 17:36:15 -0400
On Tuesday, July 20, 2004, at 02:44 PM, Douglas A. Welton wrote:
I have a button on my user interface that I would like to automatically
enable or disable based on which interface view is the current first
responder.
I have a very small demo I refer to when I need code to enable/disable
buttons and to make a button the default button. I've posted it here:
http://homepage.mac.com/mariox19/.cv/mariox19/Public/
button_example.tar.gz-link.gz
As to managing buttons based on who is the first responder, an NSView
(NSResponder, actually) is sent the message "-
(BOOL)becomeFirstResponder" when it's about to become so. There may be
an easier way, but I'm thinking you subclass your view, overriding the
above method to implement custom behavior.
Mario
=======================================================
Mario Diana Mobile: 845-380-8428
50 Forest Drive Home: 845-221-3989
Poughquag, NY 12570 Email: email@hidden
=======================================================
Programmer - Web development, Java, XML, LAMP, Mac OS X
=======================================================
_______________________________________________
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.