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

Re: Protocol for Table View Trouble


  • Subject: Re: Protocol for Table View Trouble
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 5 Aug 2008 23:09:04 -0700

On Aug 5, 2008, at 22:43, Eric Lee wrote:

#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];
}


...

- (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'

}

Well, for a start you're using a class name (drawerTableView) as if it were an instance variable.


We don't have the .h file to see what's going on, but it also seems odd to be comparing what claims to be an array to what claims to be a view.

Incidentally, [itunessongs initWithSource:@"Users/ericlee/Desktop/ Development/Watch/getitunessongs.scpt"] is going to blow up in your face. Either you are missing the 'alloc' and things are going to go wrong the 1st time you enter 'makeDrawerVisible', or, if you called alloc elsewhere, things are going to go wrong the 2nd time you enter 'makeDrawerVisible'.


_______________________________________________

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


References: 
 >Protocol for Table View Trouble (From: Eric Lee <email@hidden>)

  • Prev by Date: Re: Protocol for Table View Trouble
  • Next by Date: Re: Using performSelector: on super
  • Previous by thread: Re: Protocol for Table View Trouble
  • Next by thread: Re: Protocol for Table View Trouble
  • Index(es):
    • Date
    • Thread