On 19 Dec 08, at 19:28, Ken Thomases wrote:
I think your only avenue is to implement explicit KVV methods for your properties which have the necessary knowledge to test their type. I suppose you could file a feature request to extend declared properties so they can synthesize a type-checking validation method. Or request a compile-time directive to determine the static type of a method return or a property. (Hmm. gcc has a "typeof" extension. I wonder if it works in Objective-C.)

I'm pretty sure that typeof is, like sizeof, purely a compile-time directive. All it'll do when applied to an object pointer is return the declared type of the pointer.

However, I think you've overengineering things here. The standard runtime introspection methods, like [NSObject class] and [NSObject isKindOfClass:], should be more than enough to implement this sort of functionality.
_______________________________________________

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