Search Results

Search found 2 results on 1 pages for 'bend0r'.

Page 1/1 | 1 

  • NSPredicate and arrays

    - by bend0r
    Hello, I've got a short question. I have an NSArray filled with Cars (inherits from NSObject) Car has the @property NSString *engine (also regarded @synthesize ...) Now I want tu filter the array using NSPredicate predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"(engine like %@)", searchText]]; newArray = [ArrayWithCars filteredArrayUsingPredicate:predicate]; This throws an valueForUndefinedKey error. Is the predicateWithFormat correct? thanks for your responses

    Read the article

  • Problem getting IM information from an ABRecord

    - by bend0r
    Hello, I'm trying to get the IM account information from existing contacts (adressbook) on iPhone. I walk through the contacts and I get the contacts which have an entry in IM but I can't read the jabber-address. abArray = (NSArray *)ABAddressBookCopyArrayOfAllPeople(ABAddressBookCreate()); for(int i=0 ; i<[abArray count];i++) { ABRecordRef record = [abArray objectAtIndex:i]; ABMutableMultiValueRef multi = ABRecordCopyValue(record, kABPersonInstantMessageProperty); for(CFIndex x=0;x<ABMultiValueGetCount(multi);x++) { CFDictionaryRef dict = ABMultiValueCopyValueAtIndex(multi, x); CFStringRef jabber = CFDictionaryGetValue(dict, kABPersonInstantMessageServiceJabber); if(CFDictionaryContainsKey(dict, kABPersonInstantMessageServiceJabber)) { NSLog(@"yes"); } else { NSLog(@"no"); } // only to make it possible to log to console NSString *jaab = (NSString *)jabber; NSLog(@"jabber adress: %@" , jaab); } CFRelease(dict); } } what I'm doing wrong?

    Read the article

1