nsset Questions

4

Solved

Please note this is for OSX, not for iOS. I have looked and tried some solutions in other SO questions, but none seem to work for me, hence this: I want to get a unique set of years out of an ar...
Commutual asked 15/10, 2013 at 5:32

1

We have a bunch of NSManagedObjects of various types. Some of them have members that are NSSet's of other NSManagedObjects. The problem is that I really need to override the hash and isEquals metho...
Sacrilege asked 26/4, 2013 at 23:21

4

Solved

How to search an NSSet or NSArray for an object which has an specific value for an specific property? Example: I have an NSSet with 20 objects, and every object has an type property. I want to get...
Gocart asked 19/6, 2010 at 17:16

2

I've been working under the assumption that NSSet used hash to look up potential matches, and then called isEqual on each of those to check for real collisions, but I realized that I can't find any...
Wellfixed asked 2/3, 2011 at 1:15

5

How does one create a NSSet of objects from an array based on a property. e.g. Array of objects, each with a strong reference to a type property, and multiple occurrences of each type exist in the...
Laid asked 7/3, 2013 at 2:52

2

Solved

What, if any, NSSet and NSOrderedSet operations can one perform with the new Objective-C collection literals? For NSArray, NSDictionary, and NSNumber, see here. FWIW, this Big Nerd Ranch Post say...
Kist asked 13/8, 2012 at 19:15

4

Solved

I am not sure about how NSSet's anyObject work. What does it mean that "The object returned is chosen at the set’s convenience" (from the NSSet class reference) ? Further, how can I best extract ...
Scrofula asked 27/6, 2012 at 20:50

1

Solved

Let's say I have an NSSet that contains a collection of objects of type id<Shape> . . . of which there are CircleShape, SquareShape, HexagonalShape instances put into it (not the real protoc...
Surprising asked 11/1, 2013 at 10:20

3

Solved

Given a string, I need to obtain a count of each word that appears in that string. To do so, I extracted the string into an array, by word, and searched that way, but I have the feeling that search...
Feathercut asked 13/11, 2012 at 18:8

2

Solved

Apple's docs currently DO NOT DOCUMENT NSSet's concept of "identity". I have some bugs that appear to come from Apple's code. For instance, "[NSMutableSet minusSet]" never works for me as document...
Geanine asked 7/11, 2012 at 13:51

2

Solved

Setup: I have a Core Data object A that has a to-many relation to B. Call the relation "items". So, a.items returns all B-s associated with A. Now, I have a manually composed NSSet "itemSet" of B...
Querist asked 26/10, 2012 at 10:11

1

Solved

Surely an ordered set is a more-specific case of a set, so why does NSOrderedSet inherit from NSObject rather than NSSet?
Eudemon asked 1/7, 2012 at 1:41

1

Solved

In this test Core Data project, I have a one to many relationship from "Customer" to "Products" and this relationship is named 'products'. Customer's attribute is 'name' and Product's attribute is ...
Yuma asked 12/6, 2012 at 21:52

3

Solved

In my app I have a class Person with personId property. Now I need some data structure to hold a bunch of unique Person objects (unique = different personId) So I guess I should use NSMutableSet ...
Astigmia asked 14/5, 2012 at 15:18

1

Solved

Is there any convenient way to take an array/set of objects and create a new array/set containing some property of each item in the first array? For example, an array contains Car objects. I need ...
Contribution asked 27/3, 2012 at 13:48

2

Solved

Ran into a interesting little problem. I was writing a method to filter an array to the unique objects: - (NSArray*)distinctObjectsByAddress { NSSet* uniqueSet = [NSSet setWithArray:self]; NSArr...
Adytum asked 20/2, 2012 at 1:42

3

Solved

I have an NSArray which contains Person objects. This person object contains the following; > Name > Age > School > Address > Telephone_Number Later on i will be setting valu...
Strident asked 7/2, 2012 at 15:5

1

Solved

I'm a bit new to Cocoa and I was reading about NSIndexSet. Why is it necessary? It seems to me that NSIndexSet is nothing but a NSSet of integers, is that right? What's the purpose of creating a se...
Cf asked 19/12, 2011 at 0:12

1

Solved

Say I have an NSSet with a string in it. If I send containsObject: with another string which is a different pointer but the exact same string value, will that return YES? Also, is it the same stor...
Armyn asked 7/12, 2011 at 5:0

2

Solved

So I'm fairly new to Core Data and KVO, but I have an NSManagedObject subclass that is successfully observing its own to-many relationship. The problem is, on observed changes, I want to iterate th...
Laresa asked 4/7, 2011 at 22:3

1

Solved

I have a array of info that has multiple Names that I want to match and count then move to a table view such as you would see on a messages app. I have reached to this point. Where I can log and ...
Amandy asked 30/9, 2011 at 3:2

3

Solved

I'm loading a dictionary (list of word, not the class) into a NSSet as NSStrings. I then repeatedly send this set the message -containsObject:someNSString. But it always returns false. I wrote some...
Beneficence asked 12/8, 2011 at 8:29

1

Solved

If I have an NSSet of NSString objects, how can I join them together to create a single NSString?
Chomp asked 17/5, 2011 at 1:24

3

Solved

This question is just out of curiosity but, how is NSSet implemented? What data structure is behind it and what are the access times for adding and removing elements? If I had to guess, I'd say it ...
Normi asked 2/5, 2011 at 23:17

2

Solved

I need to determine whether an object is included in a Core Data to-many relationship (which is an NSSet), and I’m trying to decide which of two solutions is better: Solution 1) if ([managedObjec...
Fogy asked 18/3, 2011 at 19:10

© 2022 - 2024 — McMap. All rights reserved.