 |
 |
Basic inter class relationship question for Cocoa / Objective-C
|
 |
|
 |
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
OLD post deleted - I am Learning objective-c tried to bite of to much. But am still working on it. If you are interested in answer some of my questions see below. For my on going questions.
If an admin can rename this post to "Assorted questions on Cocoa / Objective-C" it would be much appreciated.
(Last edited by depolitic; Jul 8, 2004 at 10:55 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
bump - I am just looking for a pointer in the right direction. Anyone?
I believe that I need to pass the NSDictionary values into my Archiver method but no matter were I place my -(Void)setName: setEmail: method I just get nothing. No file is written out and no error is thrown.
What am I missing??
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I'm not entirely sure what you're doing. I'll point out a few things I noticed in hopes that one of them relates to your problem:
- You are not calling to super in your -[Controller init] method. Unless this is a root class, you have to call [super init] in order to keep the inheritance chain working.
- I don't know what firstNameField and emailField are, but they aren't set as far as I can tell, so you're setting the name and e-mail in KeyArchiver to nil.
- Setters (such as setName:setEMail:) need to perform memory management. It's entirely possible that those strings will disappear right out from under you if you don't retain them.
- Archiving a set of strings seems unnecessary. Why not just write out a dictionary as a plist?
- I don't know why you expect anything you do in your table view to relate to all that stuff in main. It's all finished by the time your table view has been created.
- You should check the return value of archiveRootObject... if it seems like you're having trouble there.
(Last edited by Chuckit; Jul 8, 2004 at 07:40 AM.
)
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
wow thanks - it will take me some time to look into all your points.
Why am I using archiving just for practice, plus I was told that plist could only store limited amount of data. But how much is to much I am unsure.
I think I am biting of more then I can chew. I think I should step back into something simpler.
I will get back to you
(Last edited by depolitic; Jul 8, 2004 at 07:58 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Feb 2003
Status:
Offline
|
|
|
(Last edited by depolitic; Jul 8, 2004 at 11:08 PM.
)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |