Re: IBAction deselects currently selected Core Data record?
Re: IBAction deselects currently selected Core Data record?
- Subject: Re: IBAction deselects currently selected Core Data record?
- From: Quincey Morris <email@hidden>
- Date: Mon, 29 Sep 2008 09:00:19 -0700
On Sep 28, 2008, at 16:21, Michael LaMorte wrote:
I have a Core Data application with a subclass of NSManagedObject.
The subclass has an IBAction that, when triggered, needs to get the
value of several entity properties of the currently selected record.
I have the accessor methods declared properly in the declaration and
implementation files, and they work fine from within other parts of
the code, but when executing something like this:
- (IBAction)exportData:(id)sender {
NSString *theData = [self projectName];
}
the running application errors out, and the value of projectName is
nil.
What kind of error, and where precisely does it occur? Are there any
error messages in the log?
On the face of it, there is something wrong with your code design
here. A managed object is almost certainly part of your data model. An
object that executes IBActions is almost certainly a controller. So,
an IBAction in a managed object is ordinarily a no-no.
_______________________________________________
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