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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:31:54+00:00 2026-05-17T00:31:54+00:00

While writing an iPad application, I seem to be running into a lot of

  • 0

While writing an iPad application, I seem to be running into a lot of weird errors. Basically, I have a parent class “Ticker” that checks to see if stock ticker data is cached and if it isn’t, it creates an instance of NetworkTickerData, passing itself as an argument and adding the returned data to itself.

Here is the code for [Ticker getData]:

-(void)getData
{   
    // some check here to see if the data is locally cached
    // if not
    NetworkTickerData* tick = [[NetworkTickerData alloc] initWithTicker: self];
    [tick getHistoricalTickerData];
    self.tickerData = tick.tickerData;
}

and the code for [NetworkTickerData initWithTicker:]:

+(NetworkTickerData*)initWithTicker: (Ticker*)tick
{
    NSLog(@"Doing Setup");
    NetworkTickerData* t = [[NetworkTickerData alloc] init];
    t.ticker = tick;
    t.net = [[NetworkOp alloc] init];

    return t;
}

I am getting the error: *** -[NetworkTickerData initWithTicker:]: unrecognized selector sent to instance

Is there a problem passing the variable self to initWithTicker? For what its worth, the NSLog, only there for debug purposes, never prints out.

If I had to guess, the problem must be with using self, maybe it doesn’t refer to the current class?

  • 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-17T00:31:54+00:00Added an answer on May 17, 2026 at 12:31 am

    The initWith... methods are instance methods, not class methods. Change

    +(NetworkTickerData*)initWithTicker: (Ticker*)tick
    

    to

    -(NetworkTickerData*)initWithTicker: (Ticker*)tick
    

    Note that the + changes to a -.

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

Sidebar

Related Questions

I find myself writing code that looks like this a lot: set<int> affected_items; while
While writing a game for J2ME we ran into an issue using java.lang.Integer.parseInt() We
While writing the touchesBegan handler for my view I ran into this interesting error.
While writing a small C# application for myself I realized that it would be
While writing a file using ofstream, how do I know when the file's size
while writing a custom attribute in C# i was wondering if there are any
I got this doubt while writing some code. Is 'bool' a basic datatype defined
I'm engaged in writing a product using LinqToSql for data-access. While we're rapidly developing,
I am writing a game in iPad using cocos2d. I need to mix two
While writing some C code, I decided to compile it to assembly and read

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.