FROM : Vince DeMarco
DATE : Wed Dec 18 14:29:01 2002
On Wednesday, December 18, 2002, at 1:43 PM, Tobias Peciva wrote:
> Dear List,
>
> We have a Carbon application that loads a .nib with a picture control.
> In
> the same .lproj directory we have a .rsrc file with a PICT resource
> ... and
> by some fantastic magic, the picture is always loaded into the picture
> control come runtime.
>
> Now for the pain bit: We are converting that application into a
> .bundle that
> gets loaded by another (Cocoa) application. Stuff breaks. The resource
> file
> no longer gets loaded automatically, the picture control remains
> empty. I
> was under the impression that I could store the PICT inside the .nib
> instead, but I can't see how to do this in IB (simply checking the
> prefs
> checkbox to allow this does not actually store the picture - so what
> else do
> you need to do?).
That only applies to Cocoa nib files.
> Loading the resource file explicitly before loading the
> .nib springs to mind, but naturally the Carbon FSpOpenResFile does not
> understand files with resources stored in the data fork. I guess you
> could
> load the .rsrc file data, turn it into a resource handle and use it to
> programmatically create a picture control - and lose the flexibility
> of a
> .nib in the process.
>
> What gives?
>
> Cheers,
> Tobias Peciva
> Pharos Systems
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
DATE : Wed Dec 18 14:29:01 2002
On Wednesday, December 18, 2002, at 1:43 PM, Tobias Peciva wrote:
> Dear List,
>
> We have a Carbon application that loads a .nib with a picture control.
> In
> the same .lproj directory we have a .rsrc file with a PICT resource
> ... and
> by some fantastic magic, the picture is always loaded into the picture
> control come runtime.
>
> Now for the pain bit: We are converting that application into a
> .bundle that
> gets loaded by another (Cocoa) application. Stuff breaks. The resource
> file
> no longer gets loaded automatically, the picture control remains
> empty. I
> was under the impression that I could store the PICT inside the .nib
> instead, but I can't see how to do this in IB (simply checking the
> prefs
> checkbox to allow this does not actually store the picture - so what
> else do
> you need to do?).
That only applies to Cocoa nib files.
> Loading the resource file explicitly before loading the
> .nib springs to mind, but naturally the Carbon FSpOpenResFile does not
> understand files with resources stored in the data fork. I guess you
> could
> load the .rsrc file data, turn it into a resource handle and use it to
> programmatically create a picture control - and lose the flexibility
> of a
> .nib in the process.
>
> What gives?
>
> Cheers,
> Tobias Peciva
> Pharos Systems
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
| Related mails | Author | Date |
|---|---|---|
| Tobias Peciva | Dec 18, 13:43 | |
| Avi Drissman | Dec 18, 13:52 | |
| Avi Drissman | Dec 18, 13:59 | |
| Vince DeMarco | Dec 18, 14:29 | |
| Tobias Peciva | Dec 18, 14:40 | |
| Tobias Peciva | Dec 18, 14:57 |






Cocoa mail archive

