Resource Manger calls don't work with OS X's
datafork-style resources, using MacCarbon 0.03:
use Mac::Memory;
use Mac::Resources;
my $rsrcfile = "Datafork.rsrc";
my $fileref = FSpOpenResFile($rsrcfile, 0) || die
"Can't open $rsrcfile: $!";
results in: "Unknown error: 4294967257"
Traditional resourcefork-style resources work as
expected, but they are deprecated under OS X
(cross-platform issues etc.)
Calling the Resource Manager through CoreServices in C
handles the DF/RF styles transparently. Mac::Resources
ought to do the same.
Logged In: YES
user_id=3660
Well, it is not "broken", but yes, this is an open issue,
one I have not yet had a chance to look into.
Could you be more specific about "Calling the Resource
Manager through CoreServices in C"? I don't think there is
any magic way to do it. There's FSOpenResourceFile(), which
will allow opening of a named fork, which means I'll need to
convert the FSSpec to an FSRef and determine, either through
a parameter or automatically (by default?), which fork to
open. It's a nontrivial amount of work, though this is a
need that will be addressed at some point.
Ideas, and patches, are welcome.
Logged In: YES
user_id=3660
FSOpenResourceFile() is supported in the soon-to-be-released
version of Mac::Carbon.