• 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
Re: Making views disappear and reappear
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making views disappear and reappear


  • Subject: Re: Making views disappear and reappear
  • From: Clyde McQueen <email@hidden>
  • Date: Mon, 25 Jun 2001 09:26:24 -0700

On Saturday, June 23, 2001, at 09:48 PM, Mark T wrote:

But why was there no error reported at runtime for getting the superview of a view that's not in a view?

It's a general Obj-C behavior: a message to nil returns nil. (Sort of like 0 * x => 0.)

Here are my two "Magic Debugging Rules:"
1. Crash (SIG*) almost* always means you're holding a pointer to a released object.
2. "Missing" behavior almost always means that you're passing a message to nil.

/Clyde

*But don't forget pass nil to calls like:
[NSArray arrayWithObjects:x, y, z, nil]
That'll also crash.


References: 
 >Re: Making views disappear and reappear (From: Mark T <email@hidden>)

  • Prev by Date: Re: Calling Cocoa from C
  • Next by Date: Re: Shared object between two nib file.
  • Previous by thread: Re: Making views disappear and reappear
  • Next by thread: Re: Making views disappear and reappear
  • Index(es):
    • Date
    • Thread