Assuming the "it" you are getting away with is not needing to accept a 
parameter…

On 24 Aug 2012, at 5:46 PM, Laurent Daudelin <[email protected]> wrote:

> Anybody can explain why I need to add the (id)sender to any action (IBAction) 
> methods I declare in a Mac OS X project as opposed to being able to get away 
> with it in the same file in an iOS project???

You need to do it under AppKit, and not under UIKit, because they are two 
different frameworks, designed nearly twenty years apart.

AppKit action methods have taken sender parameters since (I assume) the 
framework was first designed in the '80s. Apple probably doesn't want to monkey 
with that code. 

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.

        — F

-- 
Fritz Anderson -- Xcode 4 Unleashed: Now in stores! -- 
<http://x4u.manoverboard.org/>


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to