nsnull Questions
4
Solved
I want to create a NSDictionary with +[NSDictionary dictionaryWithObjectsAndKeys:]. One of my keys has a string but the string can sometimes be nil. If the string is nil, any other value key pairs ...
Tamayo asked 23/6, 2011 at 21:31
9
I am getting an array with null value. Please check the structure of my array below:
(
"< null>"
)
When I'm trying to access index 0 its crashing because of
-[NSNull isEqualToString:]:...
Purplish asked 27/9, 2013 at 20:6
4
Solved
I'm frequently finding the need to cache data structures created by NSJSONSerialization to disk and as -writeToFile fails if there are nulls, I need a fix that works when the structure is unknown.
...
Kaseykasha asked 1/5, 2013 at 4:48
6
Solved
Here's a context where I have seen that:
NSMutableArray *controllers = [[NSMutableArray alloc] init];
for (unsigned i = 0; i < kNumberOfPages; i++) {
[controllers addObject:[NSNull null]];
}
...
Duenna asked 7/5, 2009 at 19:39
6
Solved
i have array of birthdates as array is getting filled from facebook so there are some friends whos birthdates are private so it contain NULL how to convert that array like empty string wherever the...
Agnes asked 8/3, 2013 at 10:37
4
I am parsing a JSON response and trying to check if one of my keys is null. How would I go about this? I have the following:
var routingNumber = (dic.value(forKey: "result") as! NSDictionary).valu...
3
Solved
I have this class/storyboard scene in a project that up to last night worked fine for the past 4 weeks i worked on it.
I have managed to comment out practically everything and I still get the cras...
6
Solved
I have an NSDictionary that's populated from a JSON response from an API server. Sometimes the values for a key in this dictionary are Null
I am trying to take the given value and drop it into the...
5
Solved
I have a piece of code that detects if a NSString is NULL, nil, etc. However, it crashes. Here is my code:
NSArray *resultstwo = [database executeQuery:@"SELECT * FROM processes WHERE ready='yes' ...
Andras asked 16/4, 2011 at 2:42
6
Solved
I have a NSString object,
NSString *aString;
then are the two following versions equivalent?
Version 1 :
if ( (NSString *)[NSNull null] == aString )
{
// Logic handling
}
Version 2 :
if ( ...
Tindall asked 30/10, 2013 at 8:39
8
Solved
This question is similar to this question, however this method only works on the root level of the dictionary.
I'm looking to replace any occurrence of NSNull values with an empty string, so that ...
Fungiform asked 31/8, 2012 at 10:49
6
Solved
I want to know the difference between nil, NIL, and null.
I've googled around and found this:
nil -> null pointer to Objective-C object
NIL -> null pointer to Objective-C class
null -> nul...
Unvalued asked 6/5, 2011 at 8:45
5
Solved
I'm setting values for properties of my NSManagedObject, these values are coming from a NSDictionary properly serialized from a JSON file. My problem is, that, when some value is [NSNull null], I c...
Chang asked 4/2, 2012 at 2:28
8
Solved
I'm curious, I currently have an NSDictionary where some values are set to an NSNull object thanks to the help of json-framework.
The aim is to strip all NSNull values and replace it with an empty ...
Crib asked 10/11, 2011 at 4:52
4
Below is a code block, that is supposed to test to see if a dictionary is null, and if it isn't, pull out the correct object. However, for some reason, despite the fact that the if check fails, the...
Hedgehog asked 17/5, 2013 at 2:6
2
Solved
I'm writing an iOS App where i need to get data from a SQL-Database over mobile Services from Azure.
After downloading the data I get a NSDictionary with all attributes from the SQL-Table. If an a...
6
Solved
Actually my question here is: are null and nil equivalent or not?
I have an example but I am confused when they are equal when they are not.
NSNull *nullValue = [NSNull null];
NSArray *arrayWithN...
Columniation asked 17/3, 2010 at 10:56
2
Solved
I am develop a iPhone application, in which i need to use JSON to receive data from server.
In the iPhone side, I convert the data into NSMutableDictionary.
However, there is a date type data are...
Indetermination asked 26/9, 2011 at 6:32
16
Solved
This is sample code:
NSDictionary *myDictionary = [NSDictionary dictionary];
NSNumber *myNumber = [myDictionary valueForKey: @"MyNumber"];
NSLog(@"myNumber = %@", myNumber); // output myNumber = (...
Housemother asked 14/10, 2009 at 5:29
1
© 2022 - 2024 — McMap. All rights reserved.