0

以下のようなオブジェクト内に配列があります。

NSMutableArray* tableStructure = [[NSMutableArray alloc] init];

TableStructure *structure = [[TableStructure alloc] init];
                    structure.TableName =@"Client";
                    structure.Type =@"U";
                    structure.ColumnName =@"Id";
                    structure.DataType =@"int";
                    structure.Length = 2;

TableStructure *structure2 = [[TableStructure alloc] init];
                    structure2.TableName =@"Client";
                    structure2.Type =@"U";
                    structure2.ColumnName =@"Name";
                    structure2.DataType =@"text";
                    structure2.Length = 20;

[tableStructure addObject:structure];
[tableStructure addObject:structure2];


 NSString *typeFilter = @"U";
 NSString *nameFilter = @"sysname";
 NSString *tableNameFilter = @"Sync";

 NSPredicate *pred = [NSPredicate predicateWithFormat:@"Type == %@ and DataType != %@ and TableName != %@)", typeFilter, nameFilter, tableNameFilter];

 NSArray *filteredArray = [tableStructure filteredArrayUsingPredicate:pred];

デバッガーが NSPredicete *pred... 行に来ると、'Unable to parse the format string "Type == %@ and DataType != %@ and TableName != %@)"'エラーが発生します。

どうすればこれを解決できますか?

4

3 に答える 3