RE: buttonType in NSButton
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.