• 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
awakeFromInsert is not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awakeFromInsert is not called


  • Subject: awakeFromInsert is not called
  • From: Kubernan from 10191 Technologies <email@hidden>
  • Date: Mon, 14 Nov 2005 13:01:42 +0100

Hello,

Because i need to set an entity with default values, i followed
the apple doc : NSPersistentDocument core data tutorial.

So, i created a custom managed object class (called groupUpdateOption) adding awakeFromInsert like this :

+ (void)initialize
{
	self = [groupUpdateOption class];
}
- (void)awakeFromInsert
{
    NSLog(@"awakeFromInsert is calling");

    [super awakeFromInsert];
    [self setValue:[NSNumber numberWithInt:1]
            forKey:@"numberOfDays"];
    [self setValue:@"Once a day"
            forKey:@"updateOption"];
}

I have a NSArray controller associated to this class (i.e. as an Entity in the controller inspector).
In my model, i modified the class name from NSManagedObject to groupUpdateOption.


Starting my application, it appears awakeFromInsert is never called. What should i do for that ?

Thanks for your help,
K.
_______________________________________________
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: awakeFromInsert is not called
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Setting double action from NSCell
  • Next by Date: Re: Correct way to scale an NSTextView
  • Previous by thread: Re: xcode 2.2 coredata accessors
  • Next by thread: Re: awakeFromInsert is not called
  • Index(es):
    • Date
    • Thread