Re: Help with Basics

2010-11-23 Thread Bill Bumgarner
On Nov 23, 2010, at 5:41 PM, Rob Ross wrote: > otherwise you are not responsible and More or less (there are some exceptions). > the object will be auto-released." Sometimes. [NSString stringWithString: @"Foobar"]; [NSNumber numberWithInt: 7]; Typically returns an object that is not

Re: Help with Basics

2010-11-23 Thread Graham Cox
On 24/11/2010, at 12:41 PM, Rob Ross wrote: > It's not nonsense, although Jain's description is a little too loose. > > Rephrased: First rule of the Cocoa Club: You must not rephrase The Rules. >>> However, if class methods are used, then there is no need to worry about >>> releasing objects

Re: Help with Basics

2010-11-23 Thread Rob Ross
It's not nonsense, although Jain's description is a little too loose. Rephrased : "If you obtain an object using a method containing the words alloc, copy, or new, *you* are responsible for releasing the object, otherwise you are not responsible and the object will be auto-released." That's a t

Re: Help with Basics

2010-11-23 Thread Graham Cox
On 24/11/2010, at 3:42 AM, Rounak Jain wrote: > "If you allocate an object using alloc, you need to take responsibility for > releasing it when you’re done. > However, if class methods are used, then there is no need to worry about > releasing objects because they are auto-released." This is

Re: Help with Basics

2010-11-23 Thread Jerry Krinock
The thing that jumps out at me is that you're directly accessing the instance variable myKeys instead of using an accessor. I'm not sure why you want this to be a mutable array, but assuming that, I would use a method like this: - (NSMutableArray*)myKeys { if (!m_myKeys) { // Execut

Re: Help with Basics

2010-11-23 Thread Rounak Jain
> > We don't know what your code looks like now. You should re-post your > *latest* code to cocoa-dev@lists.apple.com and state what is the problem at > this time. As Jerry pointed out, you need to learn the basics; please read up on the basics to include memory management. The way you've n

Re: Help with Basics

2010-11-23 Thread Rounak Jain
> Rounak Jain wrote: > >> As Jerry pointed out, you need to learn the basics; please read up on the > >> basics to include memory management. > > > > I am using Garbage collector. > > ___ > > The previous comments still stand. > > For starters, there

Re: Help with Basics

2010-11-21 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rounak Jain wrote: >> As Jerry pointed out, you need to learn the basics; please read up on the >> basics to include memory management. > > I am using Garbage collector. ___ The previous comments still sta

Re: Help with Basics

2010-11-21 Thread Rounak Jain
> As Jerry pointed out, you need to learn the basics; please read up on the > basics to include memory management. I am using Garbage collector. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: Help with Basics (Was: help with bindings)

2010-11-21 Thread Ricky Sharp
On Nov 21, 2010, at 2:59 AM, Rounak Jain wrote: > Thanks Jerry, > I have used the dictionaryWithObjectsAndKeys: method. > I have implemented your suggestions regarding "convenience constructors" and > myKeys object. Regarding your comment about making everything "mutable", I > think, at the mom

Re: Help with Basics (Was: help with bindings)

2010-11-21 Thread Rounak Jain
Thanks Jerry, I have used the dictionaryWithObjectsAndKeys: method. I have implemented your suggestions regarding "convenience constructors" and myKeys object. Regarding your comment about making everything "mutable", I think, at the moment, it has to be that way. What's next? #import @inter

Re: Help with Basics (Was: help with bindings)

2010-11-20 Thread Jerry Krinock
On 2010 Nov 20, at 20:00, Rounak Jain wrote: > Please tell me the binding connections … I tried using NSArrayController but > could not get it right. Please guide me. Rounak, there are too many things wrong in your code. The guidance I offer is that you need to set your project aside, study