Converting Carbon app to Cocoa

Converting Carbon app to Cocoa

Post by pf » Thu, 28 Oct 2004 14:54:09


Hi,

I'm wondering about converting my Carbon app to Cocoa but there's two big
problems (for me). My app reads several data files created by another
application and within a data file lurks image and AIFF files. That is a
data file can be comprised of several PCX and AIFF files concatenated
together. In Carbon I can seek to the correct spot in the data file and read
the image data or AIFF data into memory and then convert and use DrawPicture
or PlaySound. But what do I use in Cocoa? Every function that could be ok
seems to want to read a disk file rather than a file already loaded into
RAM.

Any help appreciated, thanks.

Paul
 
 
 

Converting Carbon app to Cocoa

Post by Doc O'Lear » Thu, 28 Oct 2004 21:26:35

In article
<417f374e$0$687$ XXXX@XXXXX.COM
.au>,



I highly suggest actually reading the Cocoa documentation. Both NSImage
(and various representations) and NSSound support the -initWithData:
method.