• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableDictionary or Custom Object when adding properties?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableDictionary or Custom Object when adding properties?


  • Subject: Re: NSMutableDictionary or Custom Object when adding properties?
  • From: Christ Levesque <email@hidden>
  • Date: Fri, 17 May 2013 11:55:01 -0700

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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: Showing a popover from an NSOutlineView
  • Next by Date: Creating More Than 1 Of The Same Element/control
  • Previous by thread: Re: NSMutableDictionary or Custom Object when adding properties?
  • Next by thread: CTFramesetterSuggestFrameSizeWithConstraints cuts off text
  • Index(es):
    • Date
    • Thread