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
On 12 Mar '08, at 12:39 AM, Trygve Inda wrote:
I am surprised NSURLDownload and
NSURLRequest do not have userInfo ivars like many other Cocoa classes
that do asynchronous operations (NSTimer for instance).
Thanks for this. I too am surprised there is no userInfo in these
classes
and wanted t
> 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 p
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 parameter
On Mar 11, 2008, at 10:42 AM, Jens Alfke wrote:
I don't know if I agree with the working with the APIs bit. I
think it's obvious that the APIs expect a single delegate to be
able to handle multiple objects using it concurrently, thus the
passing of the object that is delegating to the dele
On 10 Mar '08, at 8:06 PM, Ben Lachman wrote:
I don't know if I agree with the working with the APIs bit. I think
it's obvious that the APIs expect a single delegate to be able to
handle multiple objects using it concurrently, thus the passing of
the object that is delegating to the deleg
> 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];
My code is:
NSURLRequest*urlRequest = [NSURLRequest requestWithURL:theURL
cachePolicy:NSURLReq
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
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
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 cle
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
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 == myNSURLDownl
I am using NSURLDownload and NSURLRequest to download 2 different types of
data (A & B)... Both of which are related to the same class so they share
delegate methods.
In my delegate, when there is an error or successful completion I need to
call one "process method" for A and a different one for B
13 matches
Mail list logo