Re: Total newbie struggling with NSMutableArray
Re: Total newbie struggling with NSMutableArray
- Subject: Re: Total newbie struggling with NSMutableArray
- From: Frederick Cheung <email@hidden>
- Date: Fri, 25 Feb 2005 14:12:04 +0000
On 25 Feb 2005, at 13:45, John Hopkins wrote:
Hi,
I hope you guys may be able to help before I throw in the towel! I
have trying to get my head around the concept of ObjectiveC and cocoa
for a while now, and thought I understood the basics! I have
programmed a little Ansi C and thought the step would be quite
straightforward. However as soon as i decided to deviate from the
examples in the various books I have bought on the subject I have
ground to a halt. I have searched high and low on the internet for an
example but documentation is lacking. I have pondered over the ADC
website, but cannot find a solution.
My scenario is this:
I have created a project in project builder with two buttons and a
textfield. The first button adds my christian name to a
NSMutableArray. The second button adds (or at least is supposed to add
my surname to the NSMutableArray and display the two in the text
field).
Here is the code that I have so far, and have tried hundreds of
variations to no avail!
[snip]
The message I get in the log window is:
2005-02-25 13:39:42.119 NSMutableArray[3957] Invalid parameter not
satisfying: aString != nil
Any pointers that anyone could give, would be greatly appreciated, and
you never know one day I may be able to answer one of your quieries,
(though I very much doubt it at the rate I'm progressing!!!)
Unless you haven't sent all of your code, you don't seem to be
allocating/initializing your array. You need to do something like
array=[[NSMutableArray alloc]init];
probably in your init method.
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden