• 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: Class Member Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class Member Question


  • Subject: Re: Class Member Question
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 2 Aug 2004 14:57:13 -0600

On Aug 2, 2004, at 2:38 PM, Shalev NessAiver wrote:

_bound.size.height;

After testing this, I see it refers to the bounds of the view. Could somebody
explain how _bounds... is accessing the bounds property of the view object? I
assume this is directly referencing the bound property.

It is. It is not a good idea to do that (make the program rely on an instance variable in a superclass that is in AppKit or Foundation) because Apple can change the insides of any AppKit or Foundation class at any time without warning. Whoever wrote that should have called [self bounds] instead of _bounds for forward compatibility reasons.

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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.


  • Prev by Date: Re: Copying an image file to pasteboard
  • Next by Date: Re: hanging on NSUserDefaults setValue:forKey
  • Previous by thread: Re: Copying an image file to pasteboard
  • Next by thread: Embedding a WebView
  • Index(es):
    • Date
    • Thread