On 12 Dec 2012, at 14:14, Jean Suisse wrote:

> On 12 déc. 2012, at 13:02, Mike Abdullah <cocoa...@mikeabdullah.net> wrote:
> 
>> Why does your code care if some unknown object is a block? This is a strong 
>> sign of a bad design.
> 
> 
> As far as I am concerned, I can think of at least two or three legitimate 
> reasons to care wether an unidentified object is a block or not.
> But you seem pretty certain. So you must have had more informations than the 
> rest of us 
> – sorry, just thinking out loud.

No extra information; just experience and a knowledge of the Cocoa APIs.
> 
> To actually answer the question, I fear that not much can be done.
> Personally, I would go for Andreas' current solution and if the app is 
> commercial, I would make sure to test & fix it before each public MAC OS 
> release, so that users can upgrade the app before upgrading the system (and 
> also check the OS version at each launch to detect if they didn't upgrade).

Seriously, you'd recommend a fragile solution that relies on private API and 
needs regular testing, over simply having two or more methods?
> 
> Otherwise, maybe this could work depending on the situation:
> -(whatever)processSomething:(id)something 
> andKeepInMindThatsABlock:(BOOL)isBlock;

Well once you've done that, surely you might as well just have two separate 
methods?!

_______________________________________________

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

Reply via email to