| Article: |
Mac OS X's Preferences System (and More!) | |
| Subject: | tests for nil in awakeFromNib incorrect | |
| Date: | 2001-08-31 18:56:33 | |
| From: | mikebeam | |
|
Response to: tests for nil in awakeFromNib incorrect
|
||
|
Indeed, records wouldn't be nil after doing [NSMutableArray alloc]. Thanks for catching that!
|
||
Showing messages 1 through 2 of 2.
-
tests for nil in awakeFromNib incorrect
2001-08-31 19:04:10 Michael Beam |
[View]
-
tests for nil in awakeFromNib incorrect
2003-05-18 20:33:11 anonymous2 [View]
It is strange that according to my test, if an init... operation failed, it does return a nil. I read the manual from Apple, it also says that a failed init... operation will release the object and return a nil. So, I think your original code is correct. :-). But I agree that you should add a [self saveData]; statement in the awakeFromNib method. Coz, it seems that the [self saveData] in the dealloc can not really save the data, so you will not re-create the missing file is you haven't modified the data. Strange!



Mike