nscoding Questions

1

Solved

When using NSCoding and decoding values, is there a way to tell if a value exists for a given key? In other words, what I'm trying to do is... if([decoder valueExistsForKey:@"myKey"]) //valueExist...
Panther asked 14/8, 2012 at 17:38

2

Solved

Ideally an NSCoding compliant class will work as expected using encodeWithCoder: and initWithCoder: (at least I thought so till recently) without the developer having to bother about what goes on i...
Robber asked 2/7, 2009 at 5:48

1

I have an NSData that was created by using NSKeyedArchiver. Is there a way to iterate over all the values inside it? It must somehow be possible to get all the keys that were stored in it when usin...
Impercipient asked 8/5, 2012 at 12:43

1

Solved

I have an interface: #import <Foundation/Foundation.h> @interface Picture : NSObject; @property (readonly) NSString *filepath; - (UIImage *)image; @end and implementation: #import "Pic...
Unutterable asked 28/4, 2012 at 11:16

1

Solved

I know that when you write the initWithCoder method of a subclass of an object that implements NSCoding you have to call super initWithCoder (instead of super init), but do I have to call super enc...
Synodic asked 6/4, 2012 at 8:30

1

Solved

I've never used NSCoding before and I'm very confused about how it should be implemented. My current iPad app has a UIImageView (called "background") which is a property of my main view controller...
Emergence asked 14/2, 2012 at 17:50

3

Solved

A have a number of NSValue (obtained via KVC valueForKey) that I need to append to an NSData object in order to send it over the network using Game Center. Obviously I will also need to convert the...
Crowded asked 9/12, 2011 at 15:1

1

I have an iOS application with data persisted using NSCoding and more precisely NSKeyedArchiver. This application is already available on the App Store. I'm working on version 2 of the application...
Tetracaine asked 25/11, 2011 at 9:27

3

I was trying to serialize a SearchEntity object(custom object) containing an NSMutableDictionary containing a set of type CategoryEntity(custom object). 1 SearchEntity<NSCoding> containing: ...
Sateen asked 3/12, 2010 at 9:23

1

Solved

I'm building an application that utilises NSCoding to save NSObject's to a documentPath. I'm having no issues doing this, I'm just curious about something. I have MACompany, which implements NSCod...
Polymerism asked 3/11, 2011 at 1:20

2

Solved

I am using NSCoding to archive/unarchive a custom class as a method of data persistence. It works fine if the object is a subclass of NSObject, but I also have objects that are subclasses of custom...
Groceries asked 26/10, 2011 at 14:39

1

Solved

I have a custom class that I wish to save and load. The class contains an NSDate, an NSString, and an NSNumber. I have implemented the NSCoding protocol in the .h file. Here is the code I have so f...

2

Solved

Base on the documentation and sample code that I have gone through, I got an impression that when a class defined in xcode is read into and configured in Interface Builder, an object based on the c...
Ganesha asked 15/1, 2011 at 4:42

1

Solved

I have objects containing Quartz-2D references (describing colors, fill patterns, gradients and shadows) in Cocoa. I would like to implement the NSCoding protocol in my objects and thus need to ser...
Cohdwell asked 16/10, 2010 at 17:33

1

Solved

My issue is then I retrieve my NSArray of Store objects, all my NSString properties are causing BadAccess errors. The int and double properties work fine! store.h @interface Store : NSObject<...
Aromatize asked 12/8, 2010 at 13:8

1

Solved

Is it possible to encode an Objective-C block with an NSKeyedArchiver? I don't think a Block object is NSCoding-compliant, therefore [coder encodeObject:block forKey:@"block"] does not work? Any ...
Irishirishism asked 31/1, 2010 at 18:20

3

Solved

I've implemented an save on applicationWillTerminate and load on applicationWillFinishLoading. There is a complete object tree, all implement the NSCoding protocol and I've check the types I enter....
Madcap asked 8/1, 2010 at 9:53

© 2022 - 2024 — McMap. All rights reserved.