• 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: subclass overwriting superclass ivar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subclass overwriting superclass ivar


  • Subject: Re: subclass overwriting superclass ivar
  • From: vincent habchi <email@hidden>
  • Date: Wed, 26 May 2010 15:36:10 +0200

Le 26 mai 2010 à 15:24, Jean-Daniel Dupas a écrit :

> Who knows what a class does when you set an ivar using the accessor. It would badly break encapsulation principle.
> For example, what would append if a NSView subclass change the view frame by accessing the _frame ivar directly ?

You are right. But this is (to me) more relevant to good coding principles. I've never programmed in PyObjC, but it should be interesting to have the advice of someone who does.

Anyhow, thanks to all for pointing out the flaw in my reasoning.
Vincent_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >subclass overwriting superclass ivar (From: "email@hidden" <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: vincent habchi <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: Graham Cox <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: vincent habchi <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: Graham Cox <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: vincent habchi <email@hidden>)
 >Re: subclass overwriting superclass ivar (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: subclass overwriting superclass ivar
  • Next by Date: Question about predicates and list properties.
  • Previous by thread: Re: subclass overwriting superclass ivar
  • Next by thread: Re: subclass overwriting superclass ivar
  • Index(es):
    • Date
    • Thread