On Jun 17, 2008, at 10:00 AM, Josh de Lioncourt wrote:

Hi all,

Thanks for the responses yesterday. They were quite helpful. However, they have led me down a number of other rivers of thought, and it seems that there should be a better way to handle the projects I'm working on than what I had originally planned. I have two main questions. The first is a simple one: is there a good, large repository of sample/open source code specifically in OBJC and/ or C++, in XCode Project form, specifically for Mac development? I've found some small repositories, but nothing that has been very useful. I learn much better from dissecting projects.

The second question is: Is the approach I had laid out the best one? It is as follows:

I have a number of WIndows applications that need to be rewritten. I want them to be easily compiled under XCode and Visual Studio.net. To that end, the bulk of the application logic will be rewritten in C ++, a language with which I have had passed experience and which I'm currently brushing up on. Precision timing, keyboard input, and limited GUI will be written platform specific. If I understand correctly, there is absolutely no way to do this in XCode without using Objective C. C++ cannot do any of these three. (Please correct me if I am wrong.) This should require me to use a mix of C+ + and Objective C (Objective C++) in XCode, through .mm files. The C ++ code will, when necessary, need to call upon the ObjC functions/ objects/methods/etc. I understand that classes/objects cannot inherit/be derived from those of the other language.

This has posed a new problem, though. My familiarity of Objective C is limited, and I am disinclined to spend a large amount of time learning yet another language strictly to accomplish these three tasks within the confines of a mainly C++ project.

Because the project has virtually no GUI, relying mainly on an audio interface, I'm wondering if there's techniques in C++ to, at the very least, generate a simple window for the application, as well as performing the other tasks that does not require Objective C.

Another option might be to locate some open source code I can draw understanding from for just these three tasks in Objective C.

...or maybe someone out there knows a better solution?
Hi Josh,

Just my opinion, but I have written cross-platform apps recently. Your approach sounds basically good. Use the Boost libraries as much as you can in your C++ code because they are cross platform, and may help you avoid implementing certain things (filesystem stuff, for instance) separately on each platform. Define a very clear API for your C++ code that will be used by the native code on each platform. (It helps to think of your C++ code as a library that you link against on each platform.)

For the Mac side, get "Cocoa Programming for Mac OS X" by Aaron Hillegass. I assume there is a current version that corresponds with Xcode 3. You will need this because the way the GUI part of a Mac app is put together is frankly difficult to get your head around when you're new at it. Learn Objective-C. It's not hard, given your background, and you really do want to use the native tools to build your GUI, even if it's simple (and Cocoa is really very cool). I also use it to build an adapter between my C++ API and my Obj-C app code.

If all you need is a command line app, then just use C++ and treat the OS like the Unix system that it (mostly) is. Works great.

Best regards,
Rush
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to