Can't access UI from a delegate?
Posted
by Nick Brooks
on Stack Overflow
See other posts from Stack Overflow
or by Nick Brooks
Published on 2010-05-27T23:44:12Z
Indexed on
2010/05/27
23:51 UTC
Read the original article
Hit count: 166
objective-c
|cocoa
I got this code:
GrooveOnDownload *dlg = [[GrooveOnDownload alloc] init];
NSURLDownload *dw = [[NSURLDownload alloc] initWithRequest:request delegate:dlg];
It starts the download in a delegate class with outlets for UI controls. But for some reason controls don't respond to direct messages from the delegate.
//Header of the delegate
@interface GrooveOnDownload : NSObject {
IBOutlet id downloadButton;
//...
//Implementation
//...
[downloadButton setEnabled:FALSE]; // Doesn't work
//...
Any ideas?
© Stack Overflow or respective owner