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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:23:18+00:00 2026-05-23T16:23:18+00:00

please i got errors when i try to read the content of a variable

  • 0

please i got errors when i try to read the content of a variable in view2 which was initialized in view1, i explain :

view1 is named RechercherViewController

view2 is named StationsSurLaCarteViewController

RechercherViewController.h :

@property (nonatomic,copy) NSString *typeCarburantChoisi;

RechercherViewController.m :

@synthesize typeCarburantChoisi;

StationsSurLaCarteViewController.h

#import "RechercherViewController.h"

@interface StationsSurLaCarteViewController : UIViewController {
IBOutlet AideStationsSurLaCarteViewController *aideStationsSurLaCarteViewController;
    IBOutlet UITextField *textField;

}
@end

StationsSurLaCarteViewController.m

- (void)viewDidLoad {
    [super viewDidLoad];
    textField.text=RechercherViewController.typeCarburantChoisi;
}

when building the app, i got actually two errors :

error: expected specifier-qualifier-list before 'StationsSurLaCarteViewController'

and

error: accessing unknown 'typeCarburantChoisi' class method

thx for help 🙂

  • 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-23T16:23:19+00:00Added an answer on May 23, 2026 at 4:23 pm

    First of all you have defined an instance property typeCarburantChoisi but in your StationsSurLaCarteViewController.m code you are trying to access kind of a class property (btw, there is no such thing in Objective-C). You will instead need a reference to your RechercherViewController instance and ask it for the property – this will resolve the second compiler error.

    Regarding the first error I am not really sure what happened here. Maybe you have an error in your RechercherViewController.h file?
    In any case, you should rather not import the interface file into StationsSurLaCarteViewController.h. Instead, use

    @class RechercherViewController;
    

    and import the full declaration in your implementation file StationsSurLaCarteViewController.m only.

    Also, did you mix up AideStationsSurLaCarteViewController and RechercherViewController in your example?

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

Sidebar

Related Questions

In my app I've got a thread which displays for some time please wait
Here is what I got so far. Please read the comment in the code.
Please take a look here: alt text http://img16.imageshack.us/img16/2810/errrp.jpg Why i got that error when
Please bear with me. I've got the jQuery validation plugin working beautifully in FF,
Please read the whole question. I'm not looking for an approach to managing multi-lingual
Please explain to me why the very last echo statement is blank? I expect
Can someone please check out this code, i really dont understand why i got
I am try to create Phonegap project in which i need to integrate ASIHTTPRequest
I got a problem : I try to call a java method that's supposed
I got this php uploading script which is working fine on Mozilla, Chrome, Opera,

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.