> On 9 May 2021, at 2:29 pm, Alex Zavatone <z...@mac.com> wrote:
> 
>> It sounds like you might need to rethink your data model a bit.
> 
> That’s what I’m trying to do!  : D

I meant the internal data model, as in how your program represents the data in 
memory and in respect of what API it provides to its clients, irrespective of 
the input file format. We would need to know more about the particulars of your 
app in order to offer more meaningful advice in that regard.

> This might be a fun case for a dict or array wrapper class for my dict or 
> array plist reader thanks to your tips. 

My inclination is to suggest that's probably not a good approach, because it 
feels like you'd be reacting to a symptom of the data model design, rather than 
improving the design.

>> No, you have it backwards. That method is useful if you want to create a 
>> plist file out of an array, dictionary, etc. To do the opposite, use 
>> propertyListWithData:….
> 
> Huh? + (NSData *)dataWithPropertyList:(id)plist returns an NSData object.

Right. That's not what you need; you want to do the reverse.

> Isn’t the propertyListWithData the one that creates a property list out of 
> NSData?

Not in the typical meaning of the phrase. It's a poorly-named method. It 
returns a "property list object" (the important part being "object"), by which 
it means an object of a class which is suitable for representing a property 
list (such as an array, dictionary, etc.).

-ben

_______________________________________________

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