Howdy,

It's very easy to do using runtime. I have a framework for doing dynamic 
creation at runtime. Also, It's easy to get O-C based class elements such as 
properties, ivars, protocols. methods using runtime. You can take a look at 
this.
https://gist.github.com/Ch0c0late/5575679 It introspects protocol conformed by 
a class & also it could add new protocol to the class. The rest of the code is 
on my local. You can feel free using it. It's part of a SCK framework. If you 
need more type e.g. methods, properties, & etc, you can take a look at my 
framework. I'm coding an OODBMS for OS X that uses O-C runtime so much. Again 
using runtime it's easy. How?
First of all the system creates an empty array. Then the user can create any 
type of object he/she wants without any limit. For archiving & unarchiving I 
used Boxing & UnBoxing classes(NSNumber, NSValue, NSNull) that let me to 
archive c primitive types and so on. There is s.t. interesting that could be 
your answer. Take a look at this one 
https://github.com/snej/MYUtilities/blob/master/MYDynamicObject.h It's a good 
class that you can use to create dynamic object at runtime. I added Archiving & 
UnArchiving mechanism to it for my own. Please note that in 64 bit system there 
is no need to declare iVars. The runtime acts as iVar & property with property. 

Down the hatch.
_______________________________________________

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

Reply via email to