Re: Why does initWithCoder has other self-object?

2011-08-18 Thread Peter
You have two independent initializers in your class. You should have one designated initializer which is called by all other initializers in your class. Quoting from The Objective-C Programming Language In the implementation of a custom initializer, you must ultimately invoke a designated

Re: Why does initWithCoder has other self-object?

2011-08-18 Thread Quincey Morris
On Aug 17, 2011, at 04:34 , Arno Oesterheld wrote: I am a beginner with Xcode and Objective-C and stuck with a quite simple thing for over two days now. I hope you can help me. My Project is deployed for OS X 10.6, it uses Garbage Collection and I am using Xcode 4.0.1. I made a multi

Re: Why does initWithCoder has other self-object?

2011-08-18 Thread Arno Oesterheld
Dear Quincey, thank you very much for your infos and hints. What you write makes sense to me. I've read the documentation that you pointed me to before. And on http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Tasks/ImplementingDocApp.html in the section

Re: Why does initWithCoder has other self-object?

2011-08-18 Thread Arno Oesterheld
Dear Peter, thank you for your details. It is true that I am confused about the initializers. Which initializer should I call from my initWithCoder method? I can not call [super initWithCoder] because NSDocument does not have such a method. Should I call [self init] instead oder [super init]?

Re: Why does initWithCoder has other self-object?

2011-08-18 Thread Jens Alfke
On Aug 18, 2011, at 7:50 AM, Arno Oesterheld wrote: I can not call [super initWithCoder] because NSDocument does not have such a method. Should I call [self init] instead oder [super init]? The advice you’ve gotten so far does not, unfortunately, address your basic problem, which is: Don’t

Why does initWithCoder has other self-object?

2011-08-17 Thread Arno Oesterheld
Hello, I am a beginner with Xcode and Objective-C and stuck with a quite simple thing for over two days now. I hope you can help me. My Project is deployed for OS X 10.6, it uses Garbage Collection and I am using Xcode 4.0.1. I made a multi document application starting with the template