On Wed, May 6, 2009 at 3:13 AM, Martin F. Carianni
<martin.caria...@gmail.com> wrote:
> Hello, i'm having some trouble with CFRunLoop, and
> performSelectorOnMainThread. I've a CFFTP client (with a latter COCOA
> implementation to interface with the GUI-class) which needs to pass a
> directory listing array to the GUI. But when I try to send the array object
> via an external selector (on a NSView class) it will ignore my
> performSelectorOnMainThread when called from the end of the directory
> listing callback. I don't know why, but it will call the internal "to self"
> methods but completely ignores the "self.delegate" ones. I cannot
> communicate with my GUI and this is very frustrating.

The most common reason for a message being "ignored" is because the
receiver is nil. Step through your code in the debugger and see if
self.delegate really is what you think it should be.

By the way, it's a bad idea to have multiple calls to
performSelectorOnMainThread: in a row like this. It's inefficient and
gives you a large opportunity for brokenness by having other actions
insert themselves in between the main-thread-perform actions. Instead,
use performSelectorOnMainThread: only once, to call out to another
method of yours which then performs all of the necessary main thread
actions together.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to