Maplets, Library Archives and the Maplet Viewer

Doug Meade's picture

My previous blog entry was a real success.

Even though my original idea about multi-part MIME has not gotten anywhere, I do now have a concise way to package a maplet with supplemental files in a single package that can be downloaded via the WWW and automatically extracted and executed.

Most of the ideas were presented by acer.

acer first suggested that I look at the interactive interface to the InstallerBuilder. The idea here was to embed the maplet in a worksheet saved in a help database (hdb).

This did work, but was not suitable for actual use due to the overhead of the installer. In the attempt to reduce this overhead, acer then supplied some code that used march and LibraryTools.

To test the product of this interaction, download the file at the URL http://www.math.sc.edu/~meade/TEST/SimpleTest.mla.

If your browser is configured to open .mla files with Maple, the Maple UI will open and a single command will be executed:

march('open', ...);

(you might have to respond to a popup asking for approval to execute the autoexecute code)

My only complaint about this is that the appearance of the worksheet is a distraction. During my calculus lecture this morning it dawned on me that I might be able to get around this by having the .mla file handled by the Maplet Reader (basically a command-line Maple, as I understand it). This works wonderfully. Change the file association to mapletviewer (also in the bin, or bin.win, directory) and the maplet -- with the supplemental image -- appears exactly as if a .maplet file had been downloaded.

Comments

Will's picture

Very cool

I am quite impressed with the file that you produced, this certainly has potential to be incredibly useful.

Can you please post the exact steps that you took to create the file?

____
William Spaetzel
MaplePrimes Administrator
Software Developer, Maplesoft

Doug Meade's picture

MLA files posted

A ZIP archive containing the Maple worksheet used to create the .mla file referenced in my blog post is now available on MaplePrimes.

Download 178_MakeMLA.zip
View file details

This archive contains 3 files. The files folder contains the image (PrimesBack.jpg) and a worksheet (Simple.mw) containing an earlier version of the maplet. The path to the image is not going to be correct for most users. The third file (MakeMLA.mw) is the one that is most interesting. The code in this worksheet creates the archive, puts the image in the archive, and defines a procedure to be executed whenever the archive is opened. The last part is the really cool contribution (due to acer).

I have attempted to write this for cross-platform usage, but have tested it only under Windows. Some adjustments for directories and file structures might be necessary.

Corrections and suggestions are welcomed.

Doug

---------------------------------------------------------------------
Douglas B. Meade
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}