Select to view content in your preferred language

Correct way to check null values

759
2
Jump to solution
06-18-2013 12:01 PM
VIKRANTKRISHNA
Regular Contributor
What is the correct way to check if attribute with type Integer is not null in the new sdk 10.1.

self.capacityStepper.value = [self.feature attributreAsIntForKey:@"Capacity" exist:Bool]

I don''t know what to put for value for "exist". Setting it to YES is giving me warning as "Incompatible Integer to Pointer". I need above value assignment to happen only when attribute value is not null;
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
BOOL exists;
int temp = [self.feature attributreAsIntForKey:@"Capacity" exist:&exists]
if(exists){
  self.capacityStepper.value = temp;
}

View solution in original post

0 Kudos
2 Replies
DiveshGoyal
Esri Regular Contributor
BOOL exists;
int temp = [self.feature attributreAsIntForKey:@"Capacity" exist:&exists]
if(exists){
  self.capacityStepper.value = temp;
}
0 Kudos
VIKRANTKRISHNA
Regular Contributor
BOOL exists;
int temp = [self.feature attributreAsIntForKey:@"Capacity" exist:&exists]
if(exists){
  self.capacityStepper.value = temp;
}



Thanks Devesh
0 Kudos