GMResource


Superclass: NSObject
Declared In: GMResourceFork

Discussion

This class represents a single resource in a resource fork.



Methods

+resourceWithType:resID:name:data:
Returns an autoreleased resource by specifying components.
-initWithType:resID:name:data:
Initializes a resource by specifying components.
-resID
The resource ID
-resType
The four-char code resource type
-name
The resource name or nil if none
-data
The resource data

resourceWithType:resID:name:data:


Returns an autoreleased resource by specifying components.

+ (GMResource *)resourceWithType:(ResType)resType resID:(ResID)resID name:(NSString *)name // May be nil data:(NSData *)data; 
Parameters
resType
The four-char code for the resource, e.g. 'icns'
resID
The ID of the resource, e.g. 256 for webloc 'url' contents
name
The name of the resource; may be nil (retained)
data
The raw data for the resource (retained)
Discussion

See CarbonCore/Finder.h for some common resource identifiers.


initWithType:resID:name:data:


Initializes a resource by specifying components.

- (id)initWithType:(ResType)resType resID:(ResID)resID name:(NSString *)name // May be nil data:(NSData *)data; 
Parameters
resType
The four-char code for the resource, e.g. 'icns'
resID
The ID of the resource, e.g. 256 for webloc 'url' contents
name
The name of the resource; may be nil (retained)
data
The raw data for the resource (retained)
Discussion

See CarbonCore/Finder.h for some common resource identifiers.


resID


The resource ID

- (ResID)resID; 


resType


The four-char code resource type

- (ResType)resType; 


name


The resource name or nil if none

- (NSString *)name; 


data


The resource data

- (NSData *)data; 

Last Updated: Monday, November 17, 2008