Re: C and objective C together
Re: C and objective C together
- Subject: Re: C and objective C together
- From: Sam Goldman <email@hidden>
- Date: Tue, 02 Apr 2002 12:11:26 -0800
Hello Jason and welcome to Cocoa!
As per your question, you could make NSStrings from the strings. If they are
formatted, you can use sprintf() to make a char* and use NSString's
stringWithCString: method. Then you can have an "Output" window with a
NSTextView and then add your string into it.
Depending on what the program does, you might want to think of a more GUI
oriented way of presenting your output. There are tons of different ways to
present data.
- Sam
On 4/2/02 11:15 AM, "Jason Reece" <email@hidden> wrote:
>
Hi there,
>
>
I have problem that maybe you good people could help me with.
>
>
I have a C program that I'm porting to Cocoa. As, the bulk of the
>
program is just number crunching I'm leaving it as C. However, the
>
program produces text messages while it is running via printf's. How do
>
I 'catch' these and display them on a window? I need to do them while
>
the thing is running ideally. I can easily replace the printf's with
>
some other function, but how do I get the data into the objective-C
>
windowing bits? Thanks
>
>
J. Reece
>
Technical & Marketing Director
>
The Ideas Studio
>
email@hidden
>
www.ideasstudio.com
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
--
Windows is a 32-bit patch to a 16-bit shell for an 8-bit operating system
written for a 4-bit processor by a 2-bit company without 1 bit of sense.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.