Re: Creating an application
- To: mathgroup at smc.vnet.net
- Subject: [mg84486] Re: Creating an application
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Sat, 29 Dec 2007 02:56:25 -0500 (EST)
- References: <fkt97m$68f$1@smc.vnet.net>
Steve Luttrell wrote:
> I just tried to do something that should easily be possible in Mathematica
> 6. To teach myself about user interfaces in Mathematica 6 I have developed
> an application that presents itself to me as various panels / tabbed views /
> etc that live in a notebook, and which works very nicely. Now I would like
> to turn it into an application that I can run cleanly, with Mathematica
> silently doing its work in the background, and not cluttering up my screen
> with any window(s) other than the window that my application uses. To keep
> things simple, it would be enough for me to create such an application for
> my own personal use alone, so it is alright to assume that I have
> Mathematica installed on my computer.
>
> For instance, if I build a simple "Hello World", then the notebook
> expression looks like this:
>
> Notebook[{
> Cell[BoxData[
> ButtonBox["\<\"Click Me\"\>",
> Appearance->Automatic,
> ButtonFrame->"DialogBox",
> ButtonFunction:>Print["Hello World"],
> Evaluator->Automatic,
> Method->"Preemptive"]], "Output",
> CellChangeTimes->{3.4076072169189997`*^9}]
> },
> WindowSize->{206, 152},
> WindowMargins->{{44, Automatic}, {74, Automatic}},
> FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, \
> 2007)",
> StyleDefinitions->"Default.nb"
> ]
>
> When I paste this into Mathematica, save the resulting notebook, quit
> Mathematica, double-click the notebook I just saved, then it fires up
> Mathematica which then loads the notebook, and I am back in the usual
> Mathematica environment.
>
> So my question is: How can one fix things so that Mathematica will run
> invisibly in support of an application, so that you couldn't even tell that
> the application was powered by Mathematica, for instance?
>
> Stephen Luttrell
> West Malvern, UK
>
>
One solution is to use my Super Widget Package(SWP) (free from my site).
This will enable you to create a Java frontend to your project. You can
also do this with GUIKit, but this seems to have problems if you try to
use it in kernel-only mode so as to eliminate the ordinary Mathematica
bar at the top. The GUIKit is also very badly documented and I doubt if
WRI are developing it any more.
Once you have a working SWP interface, you can start it from a .m file
without the FE.
I agree with what you are probably thinking - why can't you do something
equivalent with all the new code in 6.0 - I guess they never thought of it!
David Bailey
http://www.dbaileyconsultancy.co.uk