FROM : Jim Puls
DATE : Thu Mar 13 02:05:00 2008
On Mar 11, 2008, at 3:48 AM, Torsten Curdt wrote:
> Thanks!! Perfect
>
> On 11.03.2008, at 11:17, Jean-Daniel Dupas wrote:
>
>> The method your looking for is
>>
>> + (void)initialize { }
>>
>> Warning: This method can be called more than once (if a subclass
>> does not override it) so you should do something like this.
>>
>> @implementation Foo
>>
>> + (void)initialize {
>> if ([Foo class] == self) {
>> // load your images here.
>> }
>> }
I think you're trying too hard. Take a look at the docs for +[NSImage
imageNamed:], which does exactly what you want and does its own
caching, too.
-> jp
DATE : Thu Mar 13 02:05:00 2008
On Mar 11, 2008, at 3:48 AM, Torsten Curdt wrote:
> Thanks!! Perfect
>
> On 11.03.2008, at 11:17, Jean-Daniel Dupas wrote:
>
>> The method your looking for is
>>
>> + (void)initialize { }
>>
>> Warning: This method can be called more than once (if a subclass
>> does not override it) so you should do something like this.
>>
>> @implementation Foo
>>
>> + (void)initialize {
>> if ([Foo class] == self) {
>> // load your images here.
>> }
>> }
I think you're trying too hard. Take a look at the docs for +[NSImage
imageNamed:], which does exactly what you want and does its own
caching, too.
-> jp
| Related mails | Author | Date |
|---|---|---|
| Torsten Curdt | Mar 11, 11:12 | |
| Jean-Daniel Dupas | Mar 11, 11:17 | |
| Torsten Curdt | Mar 11, 11:48 | |
| Jim Puls | Mar 13, 02:05 |






Cocoa mail archive

