Fix a bunch of warnings

This commit is contained in:
Nate Weaver 2012-07-04 13:25:22 -05:00
parent a7553c7380
commit 7eef194ee3
5 changed files with 11 additions and 5 deletions

View File

@ -17,7 +17,7 @@
}
- (void)loadFontFromResource;
- (IBAction)saveResource:(id)sender;
- (void)setTableData:(id)tableResource;
- (void)setTableData:(id <ResKnifeResourceProtocol>)tableResource;
- (void)openTable:(NSDictionary *)table inEditor:(BOOL)editor;
@end

View File

@ -1,5 +1,6 @@
#import "FontWindowController.h"
#import "NGSCategories.h"
#import "ResourceDocument.h"
#import <stdarg.h>
UInt32 TableChecksum(UInt32 *table, UInt32 length)
@ -252,7 +253,7 @@ UInt32 TableChecksum(UInt32 *table, UInt32 length)
[self setTableData:[notification object]];
}
- (void)setTableData:(id)tableResource
- (void)setTableData:(id <ResKnifeResourceProtocol>)tableResource
{
NSDictionary *table = [headerTable firstObjectReturningValue:[tableResource type] forKey:@"name"];
if(!table)

View File

@ -40,6 +40,9 @@
- (NSData *)data;
- (void)setData:(NSData *)newData;
// Prevent a warning
- (id)copy;
- (NSString *)defaultWindowTitle;
- (NSDocument *)document; // Owner of this resource. Useful for looking for resources in same file as yours.

View File

@ -1,6 +1,6 @@
#import <Cocoa/Cocoa.h>
@interface DataSource : NSObject
@interface DataSource : NSObject <NSComboBoxDataSource, NSComboBoxDelegate>
{
NSString *type;
NSMutableDictionary *data;

View File

@ -125,8 +125,10 @@
NSData *data = [(id <ResKnifeResourceProtocol>)[NSClassFromString(@"Resource") resourceOfType:[plugBundle localizedStringForKey:@"snd" value:@"" table:@"Resource Types"] andID:sound inDocument:nil] data];
if( data && [data length] != 0 )
{
SndListPtr sndPtr = (SndListPtr) [data bytes];
SndPlay( nil, &sndPtr, false );
// SndListPtr sndPtr = (SndListPtr) [data bytes];
// SndPlay( nil, &sndPtr, false );
NSSound *nssound = [[[NSSound alloc] initWithData:data] autorelease];
[nssound play];
}
else NSBeep();
}