- (void)awakeFromInitializer {
[super awakeFromInitializer];
if (self.isNew) {
self.name = NSLocalizedString(@"New Field", @"");
self.fieldType = kFieldTypeText;
}
}CBLDocument *fieldDoc = [database documentWithID:[@"fld-" stringByAppendingString:[Utilities compactUniqueString]]];
TFField *newField = [TFField modelForDocument:fieldDoc];
newField.type = NSStringFromClass([TFField class]);
On Jul 20, 2015, at 8:52 PM, Brendan Duddridge <bren...@gmail.com> wrote:But that didn't work either because my code inside if statement never gets called after I create my model object. I would think that isNew would be true, but it appears to be false when newly created.