• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] How to detect missing storage allocation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.


  • Follow-Ups:
    • Re: [Q] How to detect missing storage allocation?
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: URLHandle / Authentication examples
  • Next by Date: NSBeginAlertSheet noise
  • Previous by thread: Re: how do I detect a click in a tableView cell?
  • Next by thread: Re: [Q] How to detect missing storage allocation?
  • Index(es):
    • Date
    • Thread