Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I couldn't quickly find a Cocoa method call with eleven parameters

Allow me to introduce you to NSBitmapImageRep, which holds the dubious honor of being initialized by the longest public selector in all of Cocoa. Here's a contrived example:

  NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:data
                                               pixelsWide:640     pixelsHigh:480
                                            bitsPerSample:8  samplesPerPixel:3
                                                 hasAlpha:NO        isPlanar:YES
                    colorSpaceName:@"NSCalibratedRGBColorSpace" bitmapFormat:NULL
                                              bytesPerRow:0     bitsPerPixel:0];
edit: formatting


Awesome! Thanks for the example. Painfully long but a lot easier to understand in situ than something like CreateWindow().




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: