views:

29

answers:

1

A question about specifier-qualifier-list has already been (asked) and answered but none of the anwsers given solve my problem.

My code is simple:

#import <UIKit/UIKit.h>

@interface TableCellWithTextView: UITableViewCell
{    
@private
    UITextView *theTextView;
}

@property (nonatomic, retain) UITextView *theTextView;

@end

But I get the compiler error "error: expected specifier-qualifier-list before 'UITextView'"

If I replace UITextView with UIView the error goes away. More oddly in my um.. in my view (no pun intended ;-)) is that I can also use any other view class without problem (UITextLabel, UIImageView, etc..)

But most bizarrely of all, elsewhere in my project, this compiles (and works):

#import <UIKit/UIKit.h>


@interface ToDoDetailTextViewEditCell : UITableViewCell
{
@private
    UITextView *theTextView;
}

@property (nonatomic, retain) UITextView *theTextView;

@end
A: 

OK, people don't trouble yourselves. Things got weird for me as I dragged the files over to a brand new project and everything compiled. And ultimately weird when I deleted the old copies, dragged them back in from the new 'temp' project and everything compiled again.

So, no idea what the problem was but something must have got messed up. The files were part of a brand new folder structure I'd created by hand and I'd also been doing some refactoring, renaming files, so I guess some references somewhere had just got screwed up. I tried cleaning, many times, to no avail. What I didn't try actually was to restart Xcode (though I kept thinking to do it).

But egal. It works now.

Rich