Message Boards Message Boards

1
|
4249 Views
|
4 Replies
|
6 Total Likes
View groups...
Share
Share this post:

How to make packages like EquationTrekker?

Hi,

As title says, I'm trying to make a package similar to EquationTrekker,
i.e. when user loads package, an interactive window should popup.
But I can't find any tutorials, where building of such packages is described.
Where can I get such info and examples?

I.M.
POSTED BY: Ivan Morozov
4 Replies
For your and others' benefit I am attaching a tutorial that I wrote for a client a while ago (posted with the client's permission) on the basics of creating packages.  Feel free to redistribute according to the copyright notice at the top of the notebook (free distribution so long as the notebook is not altered).
--David
Attachments:
POSTED BY: David Reiss
By the way Ivan, a tutorial for how to set up a package in Mathematica is at 

http://reference.wolfram.com/mathematica/tutorial/SettingUpMathematicaPackages.html

For your question, in such a package you would ultimately define an overall function that launches a user interface window.  Then, just after the EndPackage[ ] command you would have a line that executes that user interface launching function.  Then when the package is loaded, the user interface would launch.
POSTED BY: David Reiss
Thanks, David, that's indeed very helpful!

I,M.
POSTED BY: Ivan Morozov
One of the best ways to learn how to do something in Mathematica--aside from reading the documentation and starting with a simple project to learn the ropes--is to look at the packages that are supplied with Mathematica.  However, these may be daunting for a beginner, and the EquatinTrekker package is both quite sophisticated in terms of the various programming constructs that it uses and, in a way, "old fashioned" in that it uses GUIKit as its means of crating user interfaces rather than Mathematica's very rich user interface constructs.  The main reason for this is resumably historical in that EquationTrekker was orignally written first in 2004, prior to Mathematica's own user interface tools were launched. 

This said, you can look at the package's code in the directory that opens when you execute the following:
SystemOpen[
FileNameJoin[{$InstallationDirectory, "AddOns", "Packages",
   "EquationTrekker"}]]

But take care not to modify any of those files!

Hope this helps.

--David
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract