Alexander Heinz <mailto:ahei...@johnshopkins.edu> wrote (Tuesday, June 8, 2010 10:53 AM -0400):

Alternatively, if you can alter the method being called, (which I assume you
can, since you posted the source) you could change the methods to return an
NSNumber-wrapped boolean value, rather than a scalar value. (Standard
"written-in-Mail" warning applies)

Alexander,

That's an excellent suggestion and I think I'll adopt it (or something close to it).

I don't want to rewrite the shouldCancelAction, shouldHoldActions, etc. because those get call from a lot of other places and having them return NSNumber would be awkward. But a separate wrapper method that tests the same condition and returns it as an NSNumber would fix this nicely.

Thanks,

James

--
James Bucanek

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to