 |
 |
Can access resource fork from Cocoa?
|
 |
|
 |
|
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status:
Offline
|
|
Hi there!
I'm planning to do a complete rewrite of one application I developed in REALbasic to turn it Cocoa for Mac OS X. But I need to know if there is any access to the resource fork of a file with Cocoa, any class or API that help in the process of opening and dealing with resources.
Any help? Thanks in advance.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status:
Offline
|
|
I'm pretty sure you have to use Carbon to deal with resource forks. Carbon is ugly, procedural code, but you can easily call it from within your Cocoa app. Just add the Carbon framework(s) to your project and import the .h files you need. The Carbon documentation on developer.apple.com should have all the resource fork API details.
As an aside, I found that in Terminal you can access the resource fork of a file by appending /rsrc to the filename. For example:
% cp file1/rsrc file2
This copies the resource fork of 'file1' into the data fork of 'file2'. You might be able to use this /rsrc convention for accessing resource forks using the Cocoa file APIs.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Location: Austin, TX, USA
Status:
Offline
|
|
What will that get you (out of curiosity)? In other words, why do that?
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
A non-bog-slow, non-buggy, proper, decent program, written using frameworks supported by a big company which can actually code, unlike REALsoftware. REALbasic is a joke, 3.2 is incredibly slow (even for basic things like typing into the editor). Admittedly, RB is good for fast development of small projects, but that's about it.
RB is also not terribly useful in the real world. Obj-C is a superset of C, and many, many programming and scripting language have similar syntax. I find REALbasic and Real Software increasingly hilarious, and I'd like to thank you, Lorin, for bringing me more than a few laughs.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by Angus_D:
RB is also not terribly useful in the real world. Obj-C is a superset of C, and many, many programming and scripting language have similar syntax. I find REALbasic and Real Software increasingly hilarious, and I'd like to thank you, Lorin, for bringing me more than a few laughs.
Heh heh, you sound like the people in the database forums comparing FileMaker to Oracle.
Different products have different advantages.
BTW, how do you make a Windows program in Cocoa*? How do you make a MacOS 9 program in Cocoa? Oh, you can't - hmmm.
*Yes, I know about Yellow Box for Windows, but that is no longer available.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
I find REALbasic an increasingly funny joke. I only know of one person who has written a decently-sized, working program in REALbasic, and he's had to extend and event patch REALbasic at runtime quite a lot.
If you want Windows/OS X, you should be able to use Qt quite soon.
If you want Classic/OS X, use Carbon.
If you want Classic/OS X/Windows, there aren't any readily available frameworks that are free AFAIK, apart from wxWindows which I hear is quite buggy.
REALbasic's Windows support has always been iffy, and Carbon too (especially in 3.0, which touted Carbon as a major improvement whereas it's only really usable in 3.2). Carbon has gotten a lot better these days, but there are still many blatant bugs.
Cocoa is much more powerful than REALbasic, admittedly you don't get supposed cross-compilation for Classic/OSX/Windows, but there will be an increasing market for OS X apps, and I don't think that many people will be using REALbasic Carbon apps.
Still, I'm rambling and just have a terribly low opinion of REALbasic and REAL Software or Real Software or however you capitalize it these days.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|