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

  • Home
  • SEARCH
  • 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 805547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:05:51+00:00 2026-05-15T00:05:51+00:00

For a large programs, the standard way to chalenge a complexity is to divide

  • 0

For a large programs, the standard way to chalenge a complexity is to divide a program code into small objects. Most of the actual programming languages offer this functionality via classes, so is Objective-C. But after source code is separated into small object, the second challenge is to somehow connect them with each over. Standard approaches, supported by most languages are compositon (one object is a member field of another), inheritance, templates (generics) and callbacks. More cryptic techniques include method-level delagates (C#) and signals+slots (C++Qt). I like the delegates / signals idea, since while connecting two objects i can connect individual methods with each over, without objects knowing anything of each over. For C#, it will look like this:

var object1 = new CObject1();
var object2 = new CObject2();
object1.SomethingHappened += object2.HandleSomething;

In this code, is object1 calls it’s SomethingHappened delegate (like a normal method call) the HandleSomething method of object2 will be called.

For C++Qt, it will look like this:

var object1 = new CObject1();
var object2 = new CObject2();
connect( object1, SIGNAL(SomethingHappened()), object2, SLOT(HandleSomething()) );

The result will be exactly the same.
This technique has some advantages and disadvantages, but generally i like it more than interfaces since if program code base grows i can change connections and add new ones without creating tons of interfaces. After examination of Objective-C i havn’t found any way to use this technique i like :(. It seems that Objective-C supports message passing perfectly well, but it requres for object1 to have a pointer to object2 in order to pass it a message. If some object needs to be connected to lots of other objects, in Objective-C i will be forced to give him pointers to each of the objects it must be connected.

So, the question :). Is it any approach in Objective-C programming that will closely resemble delegate / signal+slot types of connection, not a ‘give first object an entire pointer to second object so it can pass a message to it’. Method-level connections are a bit more preferable to me than object-level connection ^_^.

  • 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-15T00:05:52+00:00Added an answer on May 15, 2026 at 12:05 am

    I’ll give you a couple of pointers to research:

    • NSNotification
    • Key Value Observing
    • NSInvocation
    • categories

    The first two are the closest to what you are asking, but the latter two have a role in this general area.

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

Sidebar

Related Questions

I've separated my large program into a number of .cpp files, e.g. display.cpp, gui.cpp,
I'm making a program that turns a large number into a string, and then
I have a large program that is working other then one .h file that
I have a very large program which I have been compiling under visual studio
I'm building a site in django that interfaces with a large program written in
I have a large Prolog program with lots of predicates. I need to connect
I have a large distributed program across many different physical servers, each program spawns
I'm developing a large C++ program and I've now decided to document it with
I am working on a large number adding program (without using biginteger class). I
Suppose my program creates a large array of data which I then save with

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.