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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:24:42+00:00 2026-05-25T21:24:42+00:00

I am about to try and pass a value that the suer selectes in

  • 0

I am about to try and pass a value that the suer selectes in a subview back to the mainview of my application. I have been doing abit of reading about how to do it, and am currently following a fairly informative tutorial here

I am starting from step 18 and implementing this into my code as it seems fairly straight forward… however I have this error in my secondview.h file where I am declaring my protocol as follows.

#import <UIKit/UIKit.h>

@protocol PassSearchData <nsobject> //this is where I get the "Cannot find protocol declaraton for 'nsobject' error
@required
- (void) setSecondFavoriteColor:(NSString *)secondFavoriteColor;
@end


@interface VehicleResultViewController : UITableViewController <NSXMLParserDelegate> {
//...
//Delegate stuff for passing information back to parent view
    id <PassSearchData> delegate;

}
//..
//Delegate stuff for passing information back to parent view
@property (retain) id delegate;
//..
@end
</PassSearchData></nsobject></uikit/uikit.h> //more errors here also..
  • 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-25T21:24:43+00:00Added an answer on May 25, 2026 at 9:24 pm

    As Malcolm Box mentioned in the comment, NSObject (and most source code, for that matter) is case-sensitive. Also, I’m not sure what the last line with </PassSearchData></nsobject></uikit/ uikit.h> is supposed to be. I’d suggest something like the following:

    #import <UIKit/UIKit.h>
    
    @protocol PassSearchData <NSObject>
    @required
    - (void) setSecondFavoriteColor:(NSString *)secondFavoriteColor;
    @end
    
    
    @interface VehicleResultViewController : UITableViewController <NSXMLParserDelegate> {
    //...
    //Delegate stuff for passing information back to parent view
        id <PassSearchData> delegate;
    
    }
    //..
    //Delegate stuff for passing information back to parent view
    @property (assign) id <PassSearchData> delegate; // not retain ?
    //..
    @end
    

    That code should probably compile, but that doesn’t necessarily mean it’s problem-free. Traditionally, delegates are not retained, because of the problem of retain cycles. So I changed the declaration of the delegate property from retain to assign.

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

Sidebar

Related Questions

I've been thinking about nested try/catch statements and started to think about under which
I've been messing about a bit to try and get my debugger (VS2010) to
I am doing the below test to try and learn more about LINQ to
I have near about six Activities and a service class with BroadcastReceiver that run
I have a process that needs to call a method and return its value.
I have a collection of about 3500 product Serial Numbers that my software uses
I have a Java application that is running embedded groovy scripts using a GroovyClassLoader
I have a web app with a form that I am trying to pass
I try to collect some information about the current state of the CWInterface(connected bssid,
When I try to commit SVN reports about 10 old directories as missing. I've

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.