Closed CPLamb closed 8 years ago
OK this is more difficult than I thought, but easy enough. The file once converted after the CSV download is a pList or an array of dictionaries. Each dictionary can have (and should have) empty NULL fields. This is OK. But 4 fields if NULL cause problems down the road, their keys are;
Driver & Category will crash the app when we try to add NULL fields to an array & Lat Long = zero causes the pins to be located in the Gulf of Africa!
So lets just loop thru the newly created list and replace any NULL values in those fields with the constants defined above.
The app can crash because certain fields are NULL and we try and add them to an array (ya can't do that). These fields are:
We need to make sure if the value read is NULL we need to add a default value.
The building of the array is in; MemberListData.m method -(void)createCSVFile if when creating this array the value is NULL we need add a default value, so that the array doesn't crash. I wuols add the default values as an example #define default driver 00A-Misc at the top of the file.
Est mnhrs = 2