Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-23-2008, 04:55 PM   #8 (permalink)
EeKay
Registered Member
 
Join Date: Aug 2008
Location: The Netherlands
Age: 31
Posts: 86
EeKay is on a distinguished road
Default encoding/decoding objects with mutablearray as property

Hi i've been searching quite some time for an example of how to encode/decode the following structure:

@interface myDataModelType : NSObject {
//datafile versioning properties
double dataVersion;

NSString *name;
int ID;
BOOL someBool;
NSMutableArray *myMutableArray;
}

I got this working as far as that it encodes/decodes objects of this class.
I can both encode/decode the name, int bool. but i cannot find any example that makes clear to me howto decode/encode the mutablearray property of this class...

i tried with decodeObjectForKey but this does not return me "the array object" with alle the records.. i red from the documentation that pointers aren't encoded, but i cannot find anywhere how it IS done instead..

Anyone succesfully implemented this? Thanks in advance..


EDIT: as it seems.. i had other bugs in my App. fixing them showed me that archiving an array as object was the way to go..
__________________
EeKay Sez:: : :

0110100001100101011011000110110001101111 to you !

WwW : www.eekay.nl
mniE : www.mynameise.com/eekay
Twitter : www.twitter.com/eekayonline

Last edited by EeKay; 11-30-2008 at 10:45 AM.
EeKay is offline   Reply With Quote
 

» Advertisements
» Online Users: 383
14 members and 369 guests
asleylq98, Clouds, DaveDee, erdinc27, eski, gogoman, jacob7khan, lionelnlex, matador1978, networ, Pudding, sacha1996, sirenum, Vijithasri06
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,595
Threads: 94,084
Posts: 402,781
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Vijithasri06
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:29 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.