Addendum: Ok - I don't see how this would be possible so am trying the delegate methods but can't get records to return in os x NStableView. I have gone through DatabaseManager.m changing the classes to my own for the view methods. The count for rows isn't returned from mappings.
//in DatabaseManager.m I changed all pertinent objects to RDFBirthday's
// the methods are getting called for group, sorting etc.. but something is missing
//in awake from nib...
databaseConnection = MyDatabaseManager.uiDatabaseConnection;
[self initializeMappings];
- (void)initializeMappings
{
[databaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
if ([transaction ext:Ext_View_Order])
{
mappings = [[YapDatabaseViewMappings alloc] initWithGroups:@[@""] view:Ext_View_Order];
[mappings updateWithTransaction:transaction];
}
else
{
// The view isn't ready yet.
}
}];
}
- (NSInteger)numberOfRowsInTableView:(NSTableView *)view{
//returns 0 rows only
return [mappings numberOfItemsInSection:0];
}
- (RDFBirthday *)todoAtIndexPath:(NSIndexPath *)indexPath
{
__block RDFBirthday *todo = nil;
[databaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
todo = [[transaction ext:Ext_View_Order] objectAtIndexPath:indexPath withMappings:mappings];
}];
return todo;
}
- (id)tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)col row:(NSInteger)row
{
NSLog(@"objectvalueForTable called here"); //never called!
NSIndexPath *indy = [NSIndexPath indexPathWithIndex:row];
RDFBirthday *birthday = [self todoAtIndexPath:indy];
if ([[col identifier] isEqualTo: @"name"]){
return birthday.bname;
}
}