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 741397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:37:39+00:00 2026-05-14T08:37:39+00:00

I am a as3 developer, I am used to use handlers everytime I launch

  • 0

I am a as3 developer, I am used to use handlers everytime I launch an event and I am wondering which is the best way / practice to do that in Objective C.

Let’s say I want to call a diferent services from my backend.

In as3 would be something like this to listent to the finish event:

service.addEventListener( Event.COMPLETE, handler_serviceDidFinished )
service2.addEventListener( Event.COMPLETE, handler_serviceDidFinished2 )

But how can I do the same in Objective C?

The problem is I already created the protocols and delegates, but how can I separate each response from the server?

For example:

-(void)callService:( NSString * )methodName withParameters:(NSMutableDictionary *) parameters
{
...
    if (self.delegate != NULL && [self.delegate respondsToSelector:@selector(serviceDidFinishSuccessfully:)]) {
        [delegate serviceDidFinishSuccessfully:data];
    }
}

Well I’m trying to create a generic delegate here, so how can I separate each response for every service?

My first idea is that maybe I should return the name of the service method in the delegate call to identify each service. Maybe I should create a UID for each service and pass it the same way…

Any idea?

  • 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-14T08:37:40+00:00Added an answer on May 14, 2026 at 8:37 am

    You might be interested in Objective-C notifications. Basically, these allow you to use a “notification center” to which you “post” different messages; then, all the callback/delegate classes can “register” for certain notifications, so that they know when to do things. This way, all your backend has to do is post the notification, and not worry about whether certain delegates respond to selectors, etc. See Cocoa Core Competencies: Notifications (as well as the NSNotificationCenter and NSNotification class references) for more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering which IDE choice you flash developer use to write the code....I
In AS3 I create a number of playing cards through a class that extends
In as3, if I add identical event listeners to an object, for examle txtField.addEventlistener(
in AS3, I have an external class ImageLoader, that loads an image upon request.
In AS3, is there a way to declare a variable in my base class
I have used Flex for about a year before deciding that I would rather
I am creating a library in AS3. Inside the library I make use of
I am trying to make a 'brush' tool in AS3 (pure, not Flex) which
I have a simple game that I am building in as3/air using flash develop,
as a skilled AS3 developer I wonder if there is something like AS3 to

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.