Re: is this badly written code?
Re: is this badly written code?
- Subject: Re: is this badly written code?
- From: Ferhat Ayaz <email@hidden>
- Date: Tue, 15 Apr 2008 06:05:30 +0200
On Apr 15, 2008, at 4:53 AM, Adam Gerson wrote:
In cocoa its very tempting to write a single line of code like:
NSManagedObject *selectedTreeObject = [[[[[self delegate]
mainWindowController] treeController] selectedObjects]
objectAtIndex:0];
If you have to embed a lot of messages, you should really consider to
redesign your code. At least since you have to send message to objects
far far far away from your actual object, it is a signal to refactor :)
Ferhat
_______________________________________________
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