I have created an Entity in CoreData that includes a Transformable attribute type implemented as an NSDictionary. The NSDictionary attribute only contains values of a custom class. The properties of the custom class are all of type NSString. The custom class complies with NSCoding implementing:
-(void)encodeWithCoder:(NSCoder*)coder;...
Is there a simple way to package a plist object (NSDictionary, NSArray, etc.) and Post it to a web service?
...
I have an array of dictionaries loaded from a plist (below) called arrayHistory.
<plist version="1.0">
<array>
<dict>
<key>item</key>
<string>1</string>
<key>result</key>
<string>8.1</string>
<key>date</key>
<date>2009-12-15T19:36:59Z</date>
</dict>
...
</array>
</plist>
I filte...
I need to check if an dict has a key or not. How?
...
Hi chaps, I have an array of nsdictionaries and one key is ID (which is unique) I simply want to see if the the array of dictionaries contains a specific ID.
Really simple but its friday and after statiny up watching the election i think my brain is melting. Any help would be great.
Thanks
...
I want store a URL against a UILabel so that when a user touches the label it takes them to that URL in a UIWebView.
I have declared a NSDictionary like so:
NSMutableArray *linksArray = [[NSMutableArray alloc] init];
[linksArray addObject: [NSValue valueWithNonretainedObject: newsItem1ReadMoreLabel]];
[linksArray addObject: [NSValue va...
Hi
I have an Array of NSDictionary objects.
These Dictionaries are parsed from a JSON file.
All value objects in the NSDictionary are of type NSString, one key is called "distanceInMeters".
I had planned on filtering these arrays using an NSPredicate, so I started out like this:
NSPredicate *predicate = [NSPredicate predicateWithForm...
I have an NSTableView which is bound to an NSDictionaryController. I have set this and the content dictionary through the interface builder. The question I have is, how do I add objects to the dictionary in a manner that the controller will see it automatically and display it in the table.
I've seen in examples about NSArrayController...
I'm trying to set up a UITableView which acts as a form. Each cell has within it a UILabel and a UITextField, so one cell is:
Name <enter name>
^ ^
UILabel UITextField
Now, I'm trying to populate the UILabel and the UITextField from a NSDictionary (from a plist), where it's organized like so:
Root ...
Having a little trouble processing my NSStrings into a valid JSON string.
NSString *version = @"1.1";
NSString *callMethod = @"auth.login";
NSString *paramsConfig = [NSString stringWithFormat:@"{\"email\":\"%@\",\"password\":\"%@\"}", usernameString, passwordString];
int queryId = arc4random()% 10000000;
NSDictionary *us...
I have the following code:
NSMutableDictionary *jsonObj = [parser objectWithString:json_string error:nil];
NSString *test = [[[jsonObj objectForKey:@"questions"] valueForKey:@"owner"] valueForKey:key];
but what I get back is:
(
1a19f089a2bc4ee42bff1c102c6e89b8
)
The actual value is fine, but I get those parenthesis, which show up ...
Hello,
I have a plist, with main NSDictionary, in which its keys are dates.
For every date, I have a NSDictionary in which the keys are (let's say) categories.
Every Category holds Keys and values.
I would like to create 2 variables that each will hold the correct NSDictionary:
NSDictionary *dates = ?
NSDictionary *Categories = ?
Be...
Hi guyz,
I am working on iphone application which contains HTTP Request and Response.
The format of the response is a key/value format compatible with the Java "Properties" stream format.
I want to store the response into a NSDictionay. Could you suggest me any way to do this?
Thank you.
sangee
Edit:
Thanks guyz for the quick rep...
I'm using NSDictionary in my iphone app.
I am using "objectForKey:" method to get the value of a key.
One thread (first thread) is adding key-value to a dictionary and other thread (second thread) is reading them.
In second thread, i want to get a value for a key which first thread some times didn't add by that time. So, in 2nd thread i ...
I am parsing a list of locations and would like to return a UIImage with a flag based on these locations.
I have a string with the location. This can be many different locations and I would like to search this string for possible matches in an NSArray, and when there's a match, it should find the appropriate filename in an NSDictionary....
Hi
I am using an NSSortdescriptor to sort a collection of NSArrays, I then came across a case where the particular NSArray to be sorted contains an NSDictionary who contains an NSDictionary.
I would like to sort from the string paired with a key in the last dictionary.
This is how I would reference the string:
NSDictionary *productDic...
I have a memory leak problem that just can not understand! Watch this initialization method:
- (id)initWithNomeCompositore:(NSString *)nomeCompositore nomeOpera:(NSString *)nomeOpera {
if (self = [super init]) {
NSString *pathOpere = [[NSBundle mainBundle] pathForResource:kNomeFilePlistOpere ofType:kTipoFilePlist];
NSDictionar...
I want to fill a NSMutableDictionary with content out of a URL File. What type file must it be and how must it be structured?
NSMutableDictionary *myMutableDictionary = [[NSMutableDictionary alloc]
initWithContentsOfURL:[NSURL URLWithString:@"http://example.com/list.txt"]];
...
I have a singleton in my FTP app designed to store all of the types of servers that the app can handle, such as FTP or Amazon S3. These types are plugins which are located in the app bundle. Their path is located by applicationWillFinishLoading: and sent to the addServerType: method inside the singleton to be loaded and stored in an NSMu...
I couldn't find a working example of the method [NSDictionary getObjects:andKeys:]. The only example I could find, doesn't compile. I provided the errors/warnings here in case someone is searching for them.
The reason I was confused is because most methods on NSDictionary return an NSArray. However, in the documentation it states that t...