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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:01:13+00:00 2026-06-12T08:01:13+00:00

I have a class with an initializer that takes a NSDictionary: -(id)initWithVector:(NSDictionary *) vectorDictionary;

  • 0

I have a class with an initializer that takes a NSDictionary:

-(id)initWithVector:(NSDictionary *) vectorDictionary;

when i try to pass it a NSDictionary, its giving me an error:

Incompatible point types sending’VectorClass * _strong’ to parameter
type ‘NSDictionary *’

code:

// myVectorList is an array of dictionaries
for (NSDictionary *vector in self.myFielder.myVectorList)
{
    if ([vector isKindOfClass:[NSDictionary class]])
    {
        // hardcoded for testing purposes 
        if ([[vector objectForKey:HANDLE] isEqualToString:@"pt07p48u17aj75qx8n2fri9jlkrc262yt8"])
        {
            // GET THE WARNING ON PASSING "VECTOR"
            VectorClass *vector = [[VectorClass alloc] initWithVector:vector];

            [vector retrieveVectorAttributeTable];
            [vector retrieveVectorMetadataTable];
        }
    }
}

if i typecast (NSDictionary *)vector, no warning.

vector should be a dictionary, so why am i getting the warning?

  • 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-06-12T08:01:14+00:00Added an answer on June 12, 2026 at 8:01 am

    You use the same name for two different variables. The inner most variable is of type VectorClass defined in the same line, so the compiler tries to pass it to the init method, instead, change its name:

    VectorClass *vectorC = [[VectorClass alloc] initWithVector:vector];
    [vectorC retrieveVectorAttributeTable];
    [vectorC retrieveVectorMetadataTable];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have developed a simple AsyncTask class that takes Handlers as its parameters and
I have a class that takes a bit of time to start up (makes
I'm at a loss here. I have this class I've created that takes arguments
It is said that when we have a class Point and knows how to
In c++ if I have a function that takes a class I have defined
I have a class that takes many arguments to create. It’s a sort of
I have a static class with a static constructor that takes some time (10-15
I have one controller that takes a username and pass and checks against a
I have a Parent class that takes two references that may or may not
I have a class that needs to be initialized but it's namespaced like this:

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.