Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

adding graphics to my console app

 
   Mac (Home) -> Programmer Help RSS
Next:  NSCursorAttributeName and NSTextView  
Author Message
MacRules

External


Since: Jun 27, 2005
Posts: 2



(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 Smile

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
Back to top
Login to vote
Patrick Machielse

External


Since: Jun 28, 2005
Posts: 92



(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 RemoveThis @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 Smile
>
> 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
Back to top
Login to vote
MacRules

External


Since: Jun 27, 2005
Posts: 2



(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.
Back to top
Login to vote
Patrick Machielse

External


Since: Jun 28, 2005
Posts: 92



(Msg. 4) Posted: Wed Jun 29, 2005 5:08 pm
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 Smile

> 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
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Weird console log output - Since moving to x3.1 or about a few weeks ago, I've started getting this message on the debug console log window: Day Mon dd hh:mm:ss host.local prog[pid] <Error>: CGContextSetStyle: invalid context Where Day = day name abbr. Mon ...

Console window for Carbon/Mach-o application - Using XCode 2.1 on Mac OS 10.4.2, I'm writing a Carbon/Mach-o application. Besides the usual menus/windows and other GUI stuff I create with interface builder, I would like to have a window displaying all stdout/stderr output. During debugging XCode ha...

adding drives to eMac - Is it possible to set up a external drive and switch from and to like on a PC? Please no laughing I am ne to the Mac world.... Tjank you. D Hill

adding multiple HIViews to an HIScrollView - I have an HIImageView that I have attached to a scroll view. Scrolling the image works fine. But I also have another HIView that contains Quarts graphics commands that are dependent on user input. How can I embed this HIView into my HIImageView so it....

Adding dylib in application bundle - Hi! There! I've successfully ported project from CodeWarrior to XCode, and have some issues... When App is compiled, it has folders resorces and macos. I have a lot of dylib's and one bundle. To run this application bundle I run in MidnightCommander..
       Mac (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
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact