• 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: Newbie: performSelector: withObject: afterDelay: inModes: question..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: performSelector: withObject: afterDelay: inModes: question..


  • Subject: Re: Newbie: performSelector: withObject: afterDelay: inModes: question..
  • From: Carlos Salinas <email@hidden>
  • Date: Fri, 8 Jul 2005 23:36:55 -0700

If, for example, the NSModalPanelRunLoopMode is omitted and a modal panel is displayed (before returning back to the event loop), the method will be performed after the modal panel is dismissed.

Likewise if NSEventTrackingRunLoopMode is omitted and the user starts dragging a slider (which is handled in an event tracking mode), the method will be performed after the user stops dragging the slider.

So it is very important to consider when you a method to be performed – while modal panels are displayed, while the user is dragging the mouse, under normal event handling.

On Jul 8, 2005, at 9:45 PM, Scott Andrew wrote:

I have a question about performSelector: withObject: afterDelay: inModes:. I
understand that this calls the selector after a specific delay. What exactly
is the modes for. I found some source code that fixes my issue with text it
is the following:


// Remember that we're in a Modal Panel run loop
[self performSelector: @selector(beginAuthentication)
withObject: nil
afterDelay: 1
inModes: [NSArray arrayWithObjects: NSDefaultRunLoopMode,
NSModalPanelRunLoopMode, nil]];


What are the modes for?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Newbie: performSelector: withObject: afterDelay: inModes: question.. (From: Scott Andrew <email@hidden>)

  • Prev by Date: Re: Documentation frustrations
  • Next by Date: Re: newbie: Why would a NSSecureTextField show a cursor but a NSTextField not?
  • Previous by thread: Re: Newbie: performSelector: withObject: afterDelay: inModes: question..
  • Next by thread: Entities without an NSManagedObjectContext?
  • Index(es):
    • Date
    • Thread