RE: error when calling function in another C file
RE: error when calling function in another C file
- Subject: RE: error when calling function in another C file
- From: RICKY SHARP <email@hidden>
- Date: Wed, 02 Jan 2008 04:27:33 -0800
On Wednesday, January 02, 2008, at 06:11AM, "Navneet Kumar" <email@hidden> wrote:
>Hi, thnks for the reply.
>Actually I'm doing-
>
>-(id)init
>
>{
>
> [super init];
> Response = [[NSMutableArray alloc] init];
> MyCFunc(response);
> return self;
>
>}
>
>Still the error...
You really need to post all relevant code. Your first e-mail didn't contain all lines of your init and thus the answers you got ultimately didn't apply.
Post the relevant sections of the stack trace too. Simply stating that there was an error related to "_CFArray" isn't helpful.
Also, you may want to consider doing checks in your init and only doing work appropriately. The pattern I use is:
- (id)init
{
if ((self = [super init]) != nil)
{
// initialize all necessary ivars here
}
return self;
}
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden