Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

performSelector:withObject:afterDelay:



"performSelector:withObject:afterDelay:" sounds like a useful resource, but I'm having trouble
tracking down an example that uses it via AppleScript. I've tried variations on the following
example without success: 

    set b to (button 1 of window 1)
    call method "performSelector:withObject:afterDelay:" of b with parameters {"performClick:", id
of b, 1}

What's the correct way to do something like this? 
-Ari 

---

> Date: Fri, 02 Jun 2006 12:42:57 -0700
> Subject: Re: Change focus to table view.
>  
> The problem is that you're changing the first responder while the return key
> is still being processed. Thus the framework is still messing with the
> business of who's got the focus and restores it to the text field as part of
> its own cleanup, which takes place after you've changed it. The solution is
> to use "delayed performance" so that the change of first responder you're
> after doesn't happen until *after* we return completely from the clicked
> handler. You can do this with an idle handler, probably; the Cocoa way is to
> call performSelector:withObject:afterDelay:, which is a lot easier.
> 
>
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/performSelector:withObject:afterDelay:>



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.