MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Codes for using MathLink with GUI dialog boxes (New versions)

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg864] Codes for using MathLink with GUI dialog boxes (New versions)
  • From: p.kent at ic.ac.uk
  • Date: Thu, 27 Apr 1995 01:36:32 -0400

Dear MathGroup,

I am pleased to announce new and improved versions of my MathLink 
programs for connecting to GUI dialog boxes.

Here are bits of the first announcement for the benefit of new
MathGroupies and others:
>
>From umahf12 Mon Nov  7 20:47:24 1994
>To: mathgroup at christensen.cybernetics.net
>Subject: Code for using MathLink with a GUI dialog box
>
>...I recently spent an eventful couple of months
>developing a GUI dialog box for use with Mathematica via MathLink.
>
>It works in the same way as the standard InputString[] dialog,
>with certain changes required for its use in the mathematics
>courseware which I am involved in creating. Fixed-width fonts
>are used, so that 2D-formatted maths appears sensibly. The input
>window of the dialog eats Return characters, and the only way to
>quit is by clicking the mouse on the quit button. It is also much
>larger than the built-in dialog.
>
>I'm happy to make the source code for this dialog box publicly 
>available in Macintosh, MS-Windows and XWindows versions. Be aware
>that these are first working versions which are messy, inefficient
>and undocumented. However I think they will be useful to anyone 
>who is trying to use, or thinking about using, MathLink with the
>various GUI windowing systems.
>

The new version, inputbox2.0, is much cleaner codewise with quite a
lot of explanatory comments. The code now implements a second dialog
box, designed for multiple-choice questions where the user response
is simply one of "A", "B", "C", "D" or "Don't Know" (these labels
may be easily changed by editing the program resources).

Once more, your feedback and suggestions are welcomed. The code is
available at URL
 <gopher://othello.ma.ic.ac.uk/11/project/DialogBox/inputbox2.0/>
or (for the old-fashioned) by gopher and anonymous ftp to
 othello.ma.ic.ac.uk (IP 155.198.192.26)
in directory
 project/DialogBox/inputbox2.0

To try out the program, download the appropriate version of inputbox.exe
and then in Mathematica do something like:

 link=Install["inputbox.exe"] (*You may need to SetDirectory[] first*)
 string1=TMPInputBox["Question text"] (*The string-input dialog*)
 string2=TMPMCQBox["More question text"] (*The multiple-choice dialog*)
 Uninstall[link] (*when finished, or quit the kernel*)

Regards, Phillip Kent.


----------------------------------+----------------------------
 Dr Phillip Kent                  | Email: p.kent at ic.ac.uk 
 Transitional Mathematics Project | 
 Mathematics Department           | Tel: +44 (0)171 594 8503 
 Imperial College                 | Fax: +44 (0)171 594 8517   
 180 Queen's Gate                 |   
 London SW7 2BZ                   | Project World-Wide-Web at: 
 United Kingdom.                  | http://othello.ma.ic.ac.uk
----------------------------------+----------------------------



  • Prev by Date: Re: mesh lines
  • Next by Date: Eigensystem?
  • Previous by thread: Re: How do I define a range of a symbol?
  • Next by thread: Eigensystem?