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

The Archive Base Latest Questions

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

I used the NSPredictate Class, but the following error has occurred. I Can’t know

  • 0

I used the NSPredictate Class, but the following error has occurred.
I Can’t know the reason.

Why does occur following error?

enter image description here

Follow is source code.

#import "Predictate.h"

@implementation Predictate

@synthesize dictate;

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

- (void)Predictate{
    dictate = [[NSMutableArray alloc]initWithObjects:@"AAA",@"BBB",@"CCC", nil];
    NSPredicate *test = [NSPredicate predicateWithFormat:@"dictate like 'AAA'"];

    NSMutableArray *result = [dictate filteredArrayUsingPredicate:test];

    NSLog(@"%@",result);
}

-(void)dealloc{
    [dictate release];
    [super dealloc];
}

@end

Error message is below.

2012-01-02 00:57:39.972 filter[1750:707] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<__NSCFConstantString 0x100002290> valueForUndefinedKey:]: this class is not key value coding-compliant for the key dictate.’

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

    You’re using NSPredicate to filter an array of string objects, but are using dictate like 'AAA'. The predicate will have absolutely no idea what this dictate means.

    You will want to replace dictate with SELF, so that it becomes "SELF like 'AAA'"

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

Sidebar

Related Questions

When used like this: import static com.showboy.Myclass; public class Anotherclass{} what's the difference between
I used to be able to do the following in Preview 3 <%=Html.BuildUrlFromExpression<AController>(c =>
I used the following code to display the event details fetched from the database.
I have the following class #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @interface Bankdaten : NSManagedObject @property
Used XStream lib, but no children XML was difficult to parse in Java. Wanting
I used vs2010 to create a project that uses framework 2.0. I can't use
I used the web platform installer to install the Orchard CMS but when the
Used as a scripting language, does Scala have some sort of include directive, or
I used Rijndael algorithm to encrypt/decrypt my data. But it is not FIPS compatible.
I have a UISearchBar setup and when its being used, it has an overlay

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.