site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com * accessors starting with "isXXX" return BOOL. At least, that's how I understand it... On Dec 31, 2009, at 1:03 AM, Shane Stanley wrote: The documentation says: A small number of test suggest -is<Key> is supported more generally. Elsewhere, the documentation says: This suggests that all three patterns are supported. And yes, there's a good reason for wanting to... -- Shane Stanley <sstanley@myriad-com.com.au> AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com> _______________________________________________ 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 _______________________________________________ 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/site_archiver%40lists.apple... * accessors starting with "getXXX" usually expect pointers to something and return their results into space pointed to, IIRC. * all other KVC accessors return primitive data types (including data structures such as NSRect, NSPoint, etc...) and object references, as appropriate to the accessor in question. "The format for an accessor method that returns a property is - <key>. The -<key> method returns an object, scalar or a data structure. The alternate naming form -is<Key> is supported for Boolean properties." "When the default implementation of valueForKey: is invoked on a receiver, the following search pattern is used: "1. Searches the class of the receiver for an accessor method whose name matches the pattern -get<Key>, -<key>, or -is<Key>, in that order. If such a method is found it is invoked." So am I likely to run into problems if I write accessors as - get<Key> or -is<Key> for properties that have synthesized accessors? Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/wsquires% 40satx.rr.com This email sent to wsquires@satx.rr.com This email sent to site_archiver@lists.apple.com
participants (1)
-
William Squires