mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-09-29 09:54:50 +00:00
Fix a bunch of warnings
This commit is contained in:
parent
a7553c7380
commit
7eef194ee3
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface DataSource : NSObject
|
||||
@interface DataSource : NSObject <NSComboBoxDataSource, NSComboBoxDelegate>
|
||||
{
|
||||
NSString *type;
|
||||
NSMutableDictionary *data;
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user