Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7496247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:32:39+00:00 2026-05-29T18:32:39+00:00

This is the prototype: – (void)startDownloadingDataOfType:(NSString *) type fromURL:(NSURL *) url delegate:(id <GetURLAsyncDelegate>) delegate;

  • 0

This is the prototype:

- (void)startDownloadingDataOfType:(NSString *) type fromURL:(NSURL *) url  delegate:(id <GetURLAsyncDelegate>) delegate;

There is a delegate set up with methods such as URLDidFinishDownloading and so on. However I stil don’t totally understand delegates – I get their point, but I don’t really know how to use them.

This function seems to contain a parameter to pass IN a delegate, but surely I want to extract one?

In the class where I want to call this function I essentially want to be able to trigger a method when the URL has finished it’s download. What is the syntax for using this kind of function in a class?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T18:32:41+00:00Added an answer on May 29, 2026 at 6:32 pm

    Passing the delegate to the prototype will cause the method to be called on the supplied delegate.

    If you want the method (URLDidFinishDownloading) to be called when the download is complete in the class you called it from, implement the delegate in that class and specify the URLDidFinishDownloading method.

    Something like below – (note: my obj-c isn’t the greatest, but hopefully you get the idea)

    @interface MyClass : BaseClass<GetURLAsyncDelegate> {
    
    }
    
    @implementation MyClass
    
    -(void)URLDidFinishDownloading  {
     ...
    }
    
    -(void)downloadData {
      [object startDownloadingDataOfType:@"..." fromUrl:... delegate:self];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method:
This is an example code from the prototype site. var url = '/proxy?url=' +
This is the URL. http://www.tumblr.com/ I think that its based on prototype, and is
Is there a way to have this prototype js trigger only when dom is
I have this Prototype code at the top of my page <script type=text/javascript> if(
i have a C function with this prototype: void foo(const char **output); i compiled
Is there a jQuery equivalent to this prototype code? Ajax.Responders.register({ onException: function(x,y) { if(y.message!=Syntax
I have the below prog Object.prototype.inherit = function(baseConstructor) { this.prototype = (baseConstructor.prototype); this.prototype.constructor =
I have a problem with scandir() : The manpage contains this as prototype: int
I'm using JQuery and Prototype in this web application that I'm developing. I'm looking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.