我在我的代码中这样做,它给了我这个错误:Expression is not an integer constant expression
代码:
//Tag for Database
#define kInsertIntoDatabase @"Insert"
#define kDeleteFromDatabase @"Delete"
#define kUpdateIntoDatabase @"Update"
#define kQueryDatabase @"Query"
-(void)documentIsReady:(NSString *)sqlmethod{
if(document.documentState == UIDocumentStateNormal)
{
context = document.managedObjectContext;
}
switch (sqlmethod) {
case kInsertIntoDatabase:
[self insertCoreDataModel];
break;
case kDeleteFromDatabase:
[self deleteCoreDataModel];
break;
case kUpdateIntoDatabase:
[self updateCoreDataModel];
break;
case kDeleteFromDatabase:
[self deleteCoreDataModel];
break;
default:
break;
}
}
怎么了?不知道出了什么问题。需要一些指导...