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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:38:03+00:00 2026-05-20T22:38:03+00:00

I have two Objective-C classes and one is derived from the other as @interface

  • 0

I have two Objective-C classes and one is derived from the other as

@interface DerivedClass : BaseClass
{
}

The code section below belongs to BaseClass:

- (id)init {
    if (self = [super init]) {
       [self configure]; 
    }   
    return self;
}

- (void) configure{} //this is an empty method

And the code section belongs to the DerivedClass:

-(void) configure{
    NSLog(@"derived configure called");
}

Now, when I say derivedInstance = [DerivedClass new]; and watch the call stack, I see that the configure method of my derived class gets called at the [self configure] line of the base’s init method.

I’m an Objective-C noob and I’m confused about how a method of a derived class gets called from the method of a base class. “self” keyword is explained to be the same thing as “this” keyword of some languages but I think this explanation is not completely correct, right?

  • 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-20T22:38:03+00:00Added an answer on May 20, 2026 at 10:38 pm

    [self someMessage] will send the message “someMessage” to the current object, which is an instance of DerivedClass.

    Message dispatch is done dynamically at run-time, so it will behave as whatever the object is at that time.

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

Sidebar

Related Questions

I have this type of file: @firstTablel: 1#one#two#three#four; 2#apple#tower#flower#robot; this is an example of
I have a new MacRuby application. I'm trying to call a MacRuby method from
I have two NSDates formatted as h:mm a as time, (i.e. 6:00 AM and
I'm new to Objective-C, and I'm trying to create an app with two buttons
Can someone summarise the key pieces of objective-c code that would assist in solving
I have created small application on iOS and have worked on web-services in .Net.
I am new to objective-c/cocoa programming. I am making an application which is to
I have few queries related to read()/pread() system calls in a multithreaded environment I
I am starting my Objective-C journey with Cocoa Programming by Daniel H Setinberg. There

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.