Re: Newbie Q - responding appropriately to buttons
Re: Newbie Q - responding appropriately to buttons
- Subject: Re: Newbie Q - responding appropriately to buttons
- From: Henry McGilton <email@hidden>
- Date: Wed, 18 Jun 2003 14:33:42 -0700
On Wednesday, June 18, 2003, at 01:42 PM, j o a r wrote:
On Wednesday, Jun 18, 2003, at 22:16 Europe/Stockholm, Robert Palmer
Jr wrote:
Is there an alternative method using notifications or messages? Is
there a way to have the button post a notification so that the search
doesn't happen immediately, but after the next run loop execution.
This way the button would flash. Of course, once the search actually
started, the application would still be held up for 5 seconds, but
again, for the moment, that's ok.
You would do something like this:
- (void) reallyPerformActionMethod
{
// Perform stuff here
}
- (void) someActionMethod:(id) sender
{
// Delay action here
[self performSelector: @selector(reallyPerformActionMethod)
withObject: nil afterDelay: 0.0];
}
This mehtod is "documented" in NSRunloop.h
Hmmmm --- and where, pray, does one actually *find* NSRunloop.h?
Anyway, the method is documented in
file:///System/Library/Frameworks/Foundation.framework/Versions/C/
Resources/English.lproj/Documentation/Reference/ObjC_classic/Classes/
NSObject.html#//apple_ref/occ/instm/NSObject/
performSelector:withObject:afterDelay:
Best Wishes,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
|
===============================+============================
_______________________________________________
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.