I've been having trouble implementing some protocols for table view. I just copied and pasted from my other code into this .m file, changed the variables so that it matched the variables in the .h file, but it has 6 errors, and I can't find out why!

Here's the .m file:

#import "drawerTableView.h"

@implementation drawerTableView

- (IBAction)makeDrawerVisible:(id)sender
{       
        [drawer setLeadingOffset:0];
        [drawer setTrailingOffset:0];
        [drawer openOnEdge:1];
        
[itunessongs initWithSource:@"Users/ericlee/Desktop/Development/Watch/ getitunessongs.scpt"];
        
        [drawerTableView reloadData];
}

- (IBAction)makeDrawerGone:(id)sender
{
        [drawer close];
}

- (NSInteger)numberOfRowsInTableView:aTableView
{
if ([itunesArray isEqual:drawerTableView]) { //says there's a "error:syntax error before 'drawerTableView'
                return [itunesArray count];

        }
        return [itunesArray count]; //says error:syntax error before 'return'
        
}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
                        row:(NSInteger)rowIndex
{
if ([itunesArray isEqual: drawerTableView]) {//says error:syntax error before 'drawerTableView'
                return [itunesArray objectAtIndex:rowIndex];
        }
return [itunesArray objectAtIndex:rowIndex]; //says error:syntax error before 'return'
        
}

- (void)tableView:(NSTableView *)anotherTableView
   setObjectValue:(id)anObject
   forTableColumn:(NSTableColumn *)anotherTableColumn
                          row:(NSInteger)rowIndex
{
if ([itunesArray isEqual: drawerTableView]) { //says error: syntax error before 'drawerTableView'
                [itunesArray replaceObjectAtIndex:rowIndex withObject:anObject];
        }
} //says there's an "error: syntax error before '}' token


@end

Thanks!

The problem parts are highlighted in green (sorry if you can't read it :( )
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to