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
Since AS3 does not allow private constructors, it seems the only way to construct
I am a AS3 novice learning PureMVC and want to write code following best
I am using AS3 to create a tween affect between multiple images that have
I've got an AS3 SWF that I'm going to be loading other SWFs into.
I'd like to know if Flash/AS3 has any nice way to convert an AS3
I can't seem to find any GUI framework's for as3 that are as good
I am a new as3 developer. Using trace method can help to print messages
How many of you already used the Prana Framework for AS3 (Flex/Flash) or heard
I'm a C# developer who is trying to learn some AS3, so this is

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.