On Aug 25, 2012, at 1:58 AM, Fritz Anderson <fri...@manoverboard.org> wrote: > UIKit was a fresh start in the past five-plus years. With a generation of > experience, Apple apparently didn't think it was always useful to pass sender > pointers. You can get away with declaring action methods without parameters > (or with two) because UIKit supports it, as AppKit does not.
Actually, I think it should work on AppKit as well: The current ABI on MacOS and iOS supports passing more parameters to a function than it actually takes. As long as the caller passes in the "sender" target, the called function can not declare it and be fine, it will just be ignored. (This isn't guaranteed by ANSI, so is not strictly correct code, but it does work on the Mac, iPhone and iPad and is documented to do so). Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com