Re: Crash when calling custom methods in custom subclass.
Re: Crash when calling custom methods in custom subclass.
- Subject: Re: Crash when calling custom methods in custom subclass.
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 30 Jul 2005 16:04:13 -0700
On Jul 30, 2005, at 3:38 PM, mmalcolm crawford wrote:
But either way I get a "EXC_BAD_ACCESS" from Debugger when I reach
the
end of the addHeaderRow: method.
What invokes addHeaderRow:, and how is it implemented?
From your original post:
On Jul 28, 2005, at 7:34 PM, Adam Raney wrote:
ACRQuizProblemRowElement *newElement;
[newElement setContent: newContent];
[newElement setFormat: newFormat];
[newElement setAnswers: newAnswers];
[newElement setIsHeader: newIsHeader];
You never create an instance of ACRQuizProblemRowElement.
Declaring a variable is not the same as creating an instance.
You need something along the lines of:
ACRQuizProblemRowElement *newElement =
[[ACRQuizProblemRowElement alloc] init];
The memory management issues will depend on what you do with the
object thereafter. In your original example you simply declare a
local variable then exit the method having done nothing with it to
make it permanent.
mmalc
_______________________________________________
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