Re: Using MathLink to create a GUI
- To: mathgroup at smc.vnet.net
- Subject: [mg61174] Re: Using MathLink to create a GUI
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Wed, 12 Oct 2005 01:42:01 -0400 (EDT)
- Organization: Uni Leipzig
- References: <dig3uc$lit$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, |I started looking at MathLink as a possible path to getting away from this | obsolete Motif interface used on Linux. I have a few questions about how I | might accomplish this. | | What's the best way to get a naked frontend widget? You know, the white | rectangle where you type in Mathematica code. .. depend on the GUI libraries that you use. | | Will this widget have some degree of Motif contamination? .. depend on the GUI libraries that you use. But probably not. | | Can I start a kernel from a program writting with MathLink? Yes. | | Do I need a kernel to have a frontend widget. It depend on your frontend. If you decide to do some computations that only the kernel can do before you frontend has finished its initialization you need a kernel, otherwise not. | If I run Mathematica from the | commandline, it typically launches a frontend instance with not kernel | running. Is that an illusion? No, the kernel is launched with the first Input that you try to evaluate. That's why it take longer to evaluate the first Input cell in a notebook. |IOW, is there really a kernel running | inside the frontend? I see there is FrontEndExecute[FrontEndToken[...]] | which could be potentially usefull for driving the FrontEnd through a GUI | linked into Mathematica through MathLink. The problem is that I need an egg | before I can have a chicken. If I want to do anything at all, I have to | have a kernel. How do I then do things such as stop and start the kernel | from within the GUI? close the link to the kernel and reopen it. | If I can quit the kernel and keep a frontend widget | that it opened, then what do I do when I open a new notebook, start a | kernel? *You* write the new frontend and you decide what your frontend will do in this case. You can also decide to reformat the root directory, or delete all source code of the new frontend or start 10000 copy of xeyes. Regards Jens