Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa application and consol out put



Hi all,
I don't know if it is the best place to ask my question. I have a console based application that use the gui just for the visualization. You may think of a scientific computation that outputs the result of the computation on the console and draw a simulation on a graphical window ( for instance an NSView). So my question is :
is it possible to do something like this on mac os using cocoa or carbon ?
On a linux system, it's simple to do because we can run a GUI application on a console with
'./my_app arg1 ... arg2'
and we can see all the result to the call of the 'printf' function on the console. With Mac os we have to create create a bundle 'MyApp.app' in order to get a correct behavior of the GUI in os x. Then to run the application we just need to double click on the application icon or run it with 'open my_app.app'. But in this case we cannont see all the result of the printf function. Here I don't like to use something like 'NSLog' to ouput my messages because I need my code to be portable on other operating system. So I really need to output my messages with 'printf' or 'cout'.
In short :
Is it possible to run a carbon or cocoa based application in a console with some input arguments and to see all the messages printed with 'printf' or 'cout' ? If some of you have some advice it will be helpfull.


Best regards,

Jaonary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.