On May 20, 2015, at 6:57 PM, Eric Wing <ewmail...@gmail.com> wrote: > On 5/20/15, Jens Alfke <j...@mooseyard.com> wrote: >> >>> On May 20, 2015, at 4:08 PM, Eric Wing <ewmail...@gmail.com> wrote: >>> >>> You could use the Objective-C runtime to find out which things are >>> properties. >> >> You could, but isn't it a lot easier to just look at the character before >> the name and check whether it's a "."? >> >> --Jens > > It depends on how pedantic you want to be. For example, if you > implemented your own setter/getter methods, the dot syntax I believe > still works even though these technically aren't properties. The Obj-C > runtime functions I'm describing makes a harder distinction and will > only list things declared with @property.
Properties existed long before there was @property. The distinction you're referring to is the difference between an informal property and a declared property. If you have implemented a getter, you have implemented a property. Yes, only declared properties can be introspected using the runtime. Regards, Ken _______________________________________________ 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