• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Connecting actions to custom entity classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connecting actions to custom entity classes


  • Subject: Connecting actions to custom entity classes
  • From: Mathieu Tozer <email@hidden>
  • Date: Thu, 8 Jun 2006 14:13:19 +1000

I'm having trouble with this :-(
This is the class header:

#import <Cocoa/Cocoa.h>


@interface TaskMO : NSManagedObject {

}

- (void)stop;

@end

and implementation file:
#import "TaskMO.h"


@implementation TaskMO

- (void)awakeFromInsert {
	[self setValue:[NSDate date] forKey:@"startDate"];
}

- (void)stop
{
	[self setValue:[NSDate date] forKey:@"endDate"];
}

@end

I have a button on the interface connected to a stop: action in the NSArrayController, but I get the following error:

2006-06-08 14:09:48.057 noodle[22325] Could not connect the action stop: to target of class NSArrayController

Can anyone tell me what's going on here? All the documentation I have found online for implementing custom methods has been about things like awakeFromInsert (as above, which works fine), but not about adding your own methods.
_______________________________________________
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
  • Follow-Ups:
    • Re: Connecting actions to custom entity classes
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: NSWindow States
  • Next by Date: Help in Getting NSFontFamilyClass
  • Previous by thread: NSWindow States
  • Next by thread: Re: Connecting actions to custom entity classes
  • Index(es):
    • Date
    • Thread