• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: blocks and id
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: blocks and id


  • Subject: Re: blocks and id
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 12 Dec 2012 22:11:39 +0000

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

> On 12 déc. 2012, at 13:02, Mike Abdullah <email@hidden> 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 (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


References: 
 >blocks and id (From: Andreas Grosam <email@hidden>)
 >Re: blocks and id (From: Charles Srstka <email@hidden>)
 >Re: blocks and id (From: Andreas Grosam <email@hidden>)
 >Re: blocks and id (From: Mike Abdullah <email@hidden>)
 >Re: blocks and id (From: Jean Suisse <email@hidden>)

  • Prev by Date: Re: NSScrollView's document view resizing?
  • Next by Date: Re: blocks and id
  • Previous by thread: Re: blocks and id
  • Next by thread: Re: blocks and id
  • Index(es):
    • Date
    • Thread