[Q] How to detect missing storage allocation?
[Q] How to detect missing storage allocation?
- Subject: [Q] How to detect missing storage allocation?
- From: "Peter.Teeson" <email@hidden>
- Date: Sun, 21 Mar 2004 17:43:48 -0500
I'm almost embarrassed to ask this but need to understand what I have
obviously not understood.
Been working on a project with a TableView and it worked entirely as
expected.
So thought it was time to move the Model code out of MyDocument into
it's own MyModel files.
This also succeeded but with one exception. When doing an addObject
nothing was added to the MutableArray. And whats more no signals or
exceptions were raised.
After much tearing of hair and trying to simplify it in a Test project
just now found out what the problem was!
In my -init for the Model I had neglected to do theRecords =
[[NSMutableArray alloc] init];
IOW no storage had been allocated. But the rest of the code was
executed.
So my question is this:
What could have been done to Alert me to the fact that no storage was
allocated?
Any way I could have set an exception to help me pinpoint this?
(Mind you guess I won't make that mistake again but it would have been
nice to find out sooner).
respect...
Peter
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.