• 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
Protocol for Table View Trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Protocol for Table View Trouble


  • Subject: Protocol for Table View Trouble
  • From: Eric Lee <email@hidden>
  • Date: Wed, 6 Aug 2008 00:43:36 -0500

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Protocol for Table View Trouble
      • From: "Shawn Erickson" <email@hidden>
    • Re: Protocol for Table View Trouble
      • From: Corbin Dunn <email@hidden>
    • Re: Protocol for Table View Trouble
      • From: Quincey Morris <email@hidden>
    • Re: Protocol for Table View Trouble
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: How to use a button to update an application with a text field value
  • Next by Date: KBML Generator/Parser
  • Previous by thread: Re: How to use a button to update an application with a text field value
  • Next by thread: Re: Protocol for Table View Trouble
  • Index(es):
    • Date
    • Thread