• 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: buttonType in NSButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: buttonType in NSButton


  • Subject: RE: buttonType in NSButton
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Wed, 11 Dec 2002 10:28:13 -0500

> I've learned at least two Cocoa lessons in the process:
> 1) Don't check for class or type when it's behavior you really want to
> know about.

It certainly worked out that way in this case, but there are many cases
where one subclasses to customize behavior. Sometimes you can find out what
you need by querying ivars, and sometimes you might need to check what class
you are dealing with.

I would say "Check if the behavior you are interested is represented by a
public ivar." I wouldn't exclude testing for class type as a possible
solution.

> 2) Do check further up the class hierarchy for the concepts or methods
> relevant to your problem.

Can't emphasize that enough.

Jonathan
_______________________________________________
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.

References: 
 >Re: buttonType in NSButton (From: "Adam Lindsay" <email@hidden>)

  • Prev by Date: Re: Initializing NSOpenGLViews
  • Next by Date: TaskWrapper commands with "*.txt" for example
  • Previous by thread: Re: buttonType in NSButton
  • Next by thread: Re: buttonType in NSButton
  • Index(es):
    • Date
    • Thread