Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

adding graphics to my console app

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  Thousand separator  
Author Message
MacRules

External


Since: May 10, 2005
Posts: 14



(Msg. 1) Posted: Mon Jun 27, 2005 7:43 pm
Post subject: adding graphics to my console app
Archived from groups: comp>sys>mac>programmer>help (more info?)

I need to add scientific visualization capability to my "console"
application (text-based UI, C code). This just means being able to open
a window and display data in graphical format. I have a couple of
options:

1. Dredge up ancient QuickDraw code I wrote back in the '90s, Carbonize
it, and adapt it for my needs. I used to know all about GrafPorts, etc.
I don't know if this is still useful :-)

2. Develop a graphical front-end in Java, and implement a two-way
communication protocol between the Java code and my C application. My C
app would ship data to the Java app for display, and the Java app would
send graphics-related user commands back to my C app. I would retain
the text-based UI for non-graphics related stuff.

The advantage to #1 is tight integration between the number-crunching
and display code. The disadvantage to #1 is loss of cross-platform
compatibility.

An advantage to #2 is learning Java (the company I work for has gone
bonkers over Java - I gotta get with the program). Also, a Java-based
solution would be cross-platform. A disadvantage to #2 is possible
headaches implementing the dynamic interface between Java and my C app
(I currently don't know how to do this, although I've heard that it can
be done).

I've been experimenting with the graphics capability of J2SE 1.5 on
Windows. There appears to be sufficiently rich graphics functionality
within Java to do what I need.

Anyone have any thoughts on this?

Thanks,
Steve

 >> Stay informed about: adding graphics to my console app 
Back to top
Login to vote
noreply

External


Since: Dec 02, 2004
Posts: 264



(Msg. 2) Posted: Tue Jun 28, 2005 10:50 am
Post subject: Re: adding graphics to my console app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MacRules <dodeca001 DeleteThis @aol.com> wrote:

> I need to add scientific visualization capability to my "console"
> application (text-based UI, C code). This just means being able to open
> a window and display data in graphical format. I have a couple of
> options:
>
> 1. Dredge up ancient QuickDraw code I wrote back in the '90s, Carbonize
> it, and adapt it for my needs. I used to know all about GrafPorts, etc.
> I don't know if this is still useful :-)
>
> 2. Develop a graphical front-end in Java, and implement a two-way
> communication protocol between the Java code and my C application. My C
> app would ship data to the Java app for display, and the Java app would
> send graphics-related user commands back to my C app. I would retain
> the text-based UI for non-graphics related stuff.
>
> Anyone have any thoughts on this?

If cross platform code is important to you, maybe OpenGL would fit the
bill. It's a C API too. (I've no experience with OpenGL)

If you are sattisfied with an OS X only solution, drawing with the Cocoa
API would seem the best solution. But you'd need to know a bit of
Objective-C.

patrick

 >> Stay informed about: adding graphics to my console app 
Back to top
Login to vote
MacRules

External


Since: May 10, 2005
Posts: 14



(Msg. 3) Posted: Wed Jun 29, 2005 5:45 am
Post subject: Re: adding graphics to my console app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I've decided to go the Java route for the time being. XCode 2.0's
support for Java is very rough around the edges but works. Apple Xcode
engineers should take a look at JCreator at http://www.jcreator.com/
for an example of what a good Java IDE should look like. Things I'd
like to see: a configurable path to the java compiler that XCode is
using, a configurable path to the java virtual machine that XCode is
using, Java-specific compiler parameters rather than a whole bunch of
irrelevant C/C++ gcc parameters, configurable CLASSPATH (named as
such), etc...

While I'm in whining mode, I'll mention that Apple provides a whole
bunch of ready-to-run Java source code, which is great, but I didn't
see an index for this code, so if I want to learn how to do something,
it's not clear where to go for an example.
 >> Stay informed about: adding graphics to my console app 
Back to top
Login to vote
noreply

External


Since: Dec 02, 2004
Posts: 264



(Msg. 4) Posted: Wed Jun 29, 2005 11:55 am
Post subject: Re: adding graphics to my console app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MacRules <dodeca001 RemoveThis @aol.com> wrote:

> Things I'd like to see: a configurable path to the java compiler that
> XCode is using,

That's in the target settings (extpert view)

> a configurable path to the java virtual machine that XCode is using,

Change this under the 'extecutables' section

> Java-specific compiler parameters rather than a whole bunch of irrelevant
> C/C++ gcc parameters,

That's indeed unfortunate, but just ignore those :-)

> configurable CLASSPATH (named as such), etc...

Target settings again.

You'll have to learn to do things the Xcode way, but after you figure it
out there really _is_ logic behind it...

patrick
 >> Stay informed about: adding graphics to my console app 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
OSX Carbon Console??? - How can I printf() or fprintf(stderr,) using the project builder for OSX Carbon? The debug thingy has a Standard I/O tab, but receives nothing... Please CC me any info. <font color=purple> ; Thanks, MMCohen</font> ..

console errors - i asked in comp.sys.mac.system and received no response i'm getting the following error messages and yes, it's a fresh boot after a fresh re-format and re-copy the files back over and the file permissions have been repaired (seems like thousands neede...

Is it possible to have "console+menu" using ProjectBuilder? - Somewhere in the E.U., le 21/10/2003 Bonjour Using MetroWerks tools I could build an app which had a GUI (mainly a menu bar, and which allowed to chose files and such in a traditional GUI way), and a console-like window for std in/outputs. ...

? prebinding message in Console - What mean this message in Console when I launch MyAppl ? Dec 8 08:18:37 localhost /usr/libexec/fix_prebinding: /Applications/MyAppl.app/Contents/MacOS/MyAppl could not be launched prebound. Dec 8 08:18:37 localhost /usr/libexec/fix_prebinding: The fil...

Carbon DebugStr silent in console (10.3?) - I got used to seeing DebugStr output in the system log (console). Under 10.3 this doesn't seem to happen any more. Can anyone explain? It was convenient to use the same call for Classic and Carbon, but must I use a different logging call now?
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]