If I complete delete all the content of a column, does the column value revert to nil or is it a NSString of length 0?
|
|
Deleting column values
Submitted by BMEguy on Tue, 2006-07-11 03:24.
Tags ( Plugin Development )
If I complete delete all the content of a column, does the column value revert to nil or is it a NSString of length 0? So would checks for an emptySubmitted by BMEguy on Tue, 2006-07-11 12:33.
So would checks for an empty column value look like this: NSString *recurString = [entryData valueForKey:MGrecurKey]; Thanks Yes I think that should doSubmitted by Jesse Grosjean on Tue, 2006-07-11 13:33.
Yes I think that should do the trick. Just for completeness sakeSubmitted by BMEguy on Tue, 2006-07-11 21:25.
Just for completeness sake (and so I don't miss any checks): How are the other data types handled? Thanks I'm not sure :( All theSubmitted by Jesse Grosjean on Tue, 2006-07-11 21:32.
I'm not sure :( All the different formatters and such it's hard to figure out what they will do sometimes. But my guess is that they might be using '0' to represent empty sometimes, so you might also want to check for that with dates and numbers. Probably best to actually check this though. Well, after testing, I canSubmitted by BMEguy on Tue, 2006-07-11 22:36.
Well, after testing, I can confirm that, at least for Mori, erasing a date field will return the value to nil. I tested with two opposing predicates (one for nil and one for !nil) and also output the entryData description. |
it depends. if you delete
it depends. if you delete the column content using the GUI that I think (if it's a string column) the value will be a string of length 0. But if you delete content from code (such as set the value to nil) then the value should be also saved as nil.