Well, there are a few more places I see it used for delegate-like
operations :)
NSCachedURLResponse - also in WebKit
NSTrackingArea
NSEvent (called userData)
NSBeginAlertSheet() (called contextInfo)
So yeah, you are right it is not used everywhere, but I think it is
used enough for it to be
Hi,
Oh, sorry, replace everything in that message with NSURLDownload, same
idea.
I agree with your original approach, especially if you just need to
store an int (or an NSNumber in this case).
There is a reason almost every delegate method in Cocoa passes the
delegate object as a
Do you have two instances of NSURLDownload?
if they are declared in the .h file you could test for equality in the
downloadDidFinish:
delegate method.
- (void)downloadDidBegin:(NSURLDownload *)download {
if(download == myNSURLDownloadA) {
// something for a
}
if(download ==
Alternatively, if you're managing more than two requests at a time
you can declare a mutable array of connections and then build a
dictionary for each connection that includes any info you want you
delegate to have available. I have a method that build the
connection dict for a connection
On 10 Mar '08, at 6:35 PM, Ben Lachman wrote:
Alternatively, if you're managing more than two requests at a time
you can declare a mutable array of connections and then build a
dictionary for each connection that includes any info you want you
delegate to have available.
I think it's
On Mar 10, 2008, at 9:52 PM, Jens Alfke wrote:
On 10 Mar '08, at 6:35 PM, Ben Lachman wrote:
Alternatively, if you're managing more than two requests at a time
you can declare a mutable array of connections and then build a
dictionary for each connection that includes any info you want you
Or, yet another solution:
Just subclass NSURLConnection (say MyUserInfoURLConnection), add a
userInfo ivar, drop in some accessors, and you are good to go. :)
[userInfoConnection userInfo];
Adam Leonard
On Mar 10, 2008, at 6:52 PM, Jens Alfke wrote:
On 10 Mar '08, at 6:35 PM, Ben Lachman