Re: Amount of Arguments per Method
Re: Amount of Arguments per Method
- Subject: Re: Amount of Arguments per Method
- From: Ken Ferry <email@hidden>
- Date: Thu, 25 Jun 2009 22:00:54 -0700
Not a method, but NSCell.h has a function with 13 arguments.
APPKIT_EXTERN void NSDrawNinePartImage(NSRect frame, NSImage *topLeftCorner,
NSImage *topEdgeFill, NSImage *topRightCorner, NSImage *leftEdgeFill,
NSImage *centerFill, NSImage *rightEdgeFill, NSImage *bottomLeftCorner,
NSImage *bottomEdgeFill, NSImage *bottomRightCorner, NSCompositingOperation
op, CGFloat alphaFraction, BOOL flipped)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
-Ken
On Mon, Jun 22, 2009 at 1:03 AM, Roland King <email@hidden> wrote:
> This still the longest one or has Apple outdone themselves since? 11 args,
> you really wouldn't want much more than this.
>
> -(id)initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:
>
>
> WT wrote:
>
>> On Jun 22, 2009, at 8:05 AM, Chunk 1978 wrote:
>>
>> clearly simplicity is important, but i'd like to know if there is a
>>> limit for the amount of arguments which a method can handle?
>>>
>>
>>
>> I don't know if there's an upper limit, but I don't recall ever writing a
>> method with more than 5 or 6 arguments. When I feel inclined to do
>> otherwise, it typically means that there's a flaw in my design.
>>
>> Wagner
>> _______________________________________________
>>
>> 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
>>
> _______________________________________________
>
> 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
>
_______________________________________________
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