Table of contents

▸ [top]
▸ Data visualization
▸ Data processing
▸ Graphic library
▸ GUI & GUI customization
▸ XML & text processing
▸ Comfort
▸ Install & docs
▸ Productivity
▸ Files
Satimage Previous | Next
Release notes for Smile 3.1
Home page Support Release notes for Smile 3.1  
New in 3.1

Smile 3.1 is only for Tiger (Mac OS X 10.4.x) or higher. Smile now ships as a Universal binary, in other words it runs natively on PPC as well as on Intel machines.

The Scripting Additions which ship with Smile 3.1 are Universal binary, too, they run natively on PPC as well as on Intel machines, but do not attempt to install them in a machine running Mac OS X 10.3.

New in Smile 3.1.9

  • The call remote port command has new optionnal parameters: error subroutine and userparam. Consult Smile's dictionnary for more info.
  • The window transparency property of dialogs has been renamed window opacity.
  • Saving a script window as an applet or a droplet without naming it with a .app extension didn't work properly. This bug is fixed.
  • Replacing text in unicode files using the Enhanced Find Dialog didn't work properly. This is fixed.

New in Smile 3.1.8

  • You can now make a graphic file of arbitrary resolution by specifying the new resolution property of a graphic window. Default is 72 dpi.
  • The DrawImage command of the graphic library now handles the image's resolution if the user does not specify a destination rectangle.
  • When you open an HTML file in a Unicode window, pressing ⌥⌅ displays the web page in a web window. The same behavior is now applied to XML files which contain an XSL declaration (for instance, if they start with <?xml-stylesheet type="text/xml" href="http://xml.comp-phys.org/2001/9/QMCXML.xsl"?>.)
  • The pen width property of the plot views was not saved (in bundle format.) This is fixed.
  • Dialogs have a new window transparency property (0 = transparent, 1 = opaque.) For floating palettes (either the floating or the utility window property is true), clicking in the palette resets the transparency to opaque (1.)
  • The legend height property of plot views is now relative to the legend's text size.
  • The new key parameter of the navchoose file, navchoose file name, and navchoose folder commands associate a key to the folder that the user will select. If no starting at parameter is provided, the folder corresponding to the key provided is assumed as the default folder.
  • If a drawing was defined with an OverlayDrawing handler in the script of a view, suppressing the handler would not remove the drawing. This is fixed.
  • create imagefile would not handle correctly the color palette parameter. This is fixed.
  • The GetUTI returned a bad result when called with a file type parameter. This is fixed.
  • The display of the frame of a plot view defined with a semi-transparent color was wrong. This is fixed.
  • Opening the font panel for a Unicode window then clicking in a web window would crash Smile. This is fixed.
  • The name of the xsl variables parameter of the XMLTransform command was changed to xsl params.

New in Smile 3.1.7

  • Smile will now open any file that you drop on its icon.
  • When Smile opens a file with a file name extension, say .ext, Smile will call customopen_ext(f) - if that handler exists in Smile's context. This lets you open files that Smile does not handle by default, or redefine the default behavior for a specific file extension.
  • The new XMLSchema and XMLRelaxNG commands validate a XML document according to a .xsd schema or a .rng relaxNG schema.
  • ⌘⌅ now validates .xsd (XML schema) and .rng (XML relaxNG) files.
  • The new XMLRegexp command finds text nodes matching a given regular expression pattern.
  • The new XMLFindText command finds text nodes containing a specific string.
  • The new GetUTI and UTIConform commands return the UTI (Universal Type Identifier) for a file.
  • Smile would not display the comments in .plist files. This is fixed.

New in Smile 3.1.6

  • The sortarray command now sorts any list instead of working only on lists of arrays of reals.
  • You can now make floating dialogs which float above the windows of all applications by setting the new utility window property of dialogs when creating the dialog. Example: set w to make new basic object with properties {path name:FindInMoreStuff("Palette GK"), utility window:true}.
  • Smile now receives a switched to event (that you can handle) whenever the user switches between applications.
  • The new encode entities command replaces the 5 reserved XML characters in the direct parameter with the corresponding XML entities.
  • The ▸ More Smile commands ▸ Dialogs ▸ Make stand-alone application user script was reviewed and it can now make an existing dialog into a palette dedicated to any given application.
  • XMLTransform now works also on any XML node (in addition to working on XML documents.)
  • You can handle plist documents relatively to their paths with the new PlistURL and PlistDocument commands.
  • The new XMLIndexDocument command indexes or re-indexes a document. Use this command to speed up XMLTransform and XMLXPath when an expression involves node ordering.

Click a theme below or in the table of contents on the left to jump to the corresponding section.


Data visualization
  • A new Shortcuts item in the Graphs menu opens a new help window which summarizes the main user actions allowed on graphics.
  • Two new objects: triangulated map and triangulated contour (elements of a planar view) visualize non-parametric data, that is, data provided as an arbitrary set of (point, value). Examples are provided in Help ▸ SmileLab Samples (category: Triangulation.)
  • The axis of plot views are now double-precision numbers.
  • You can now fit data without a script - using the standard interface only: a curve graph being the front window, select the Graphs ▸ Curve fit menu item.
  • You can now make a graphic file of arbitrary resolution by specifying the new resolution property of a graphic window. Default is 72 dpi.
  • You can now mask data in a curve: when you define a polygon by repetitively clicking with the option (⌥) key pressed in a curve's window, SmileLab will redraw the plot with the data outside the polygon masked.
  • Using Copy ⌘C in a graphic window which displays the mouse's coordinates in the toolbar now copies the coordinates displayed into the Clipboard.
  • The Graphs ▸ Profile section (resp. Curve fit) command is now also available in the contextual menu for planar views (resp. plot views). You will be able to select what data to explore is there are several plots in the view.
  • A new triangulate command makes a list of 2D points into a list of triangles. You can now in particular make a GLObject (with kind: triangle set) to represent a surface, given a set of 3D points. An example is provided in Help ▸ SmileLab Samples.
  • You can make an histogram with a curve, by settings its pattern style to 10. You can now define the bar width by setting the new histogram bar width property of the curve. Colors are defined by the pen color and fill color properties.
  • A new kind for GLUObjects, GLUCube, makes a cube with its facets parallel to the axes.
  • The contour maps and the (new) triangulated contours can now be drawn as dashed lines using their new dash property.
  • The new movie codec property of graphic windows specifies the codec that add movieframe uses. Set movie codec to the 4-characters identifier of the codec you want to use.
    set movie codec of w to "avc1" -- select H264
  • GLUObjects have a new transformation property (a 4 x 4 matrix) that you can use, for example, to make an arbitrary parallelepiped (with kind: GLUCube) or an arbitrary ellipsoid (with kind: GLUSphere.)
  • chart views now have a legend pen color and a legend text color properties, to customize the rendering of the legend.
  • scalar maps now have a fill color property to set their background color.
  • plot views and planar views now have a text color property to set the color for the scales' texts.
  • graphic windows now have a text color property to set the color for the names of the window's graphic views.
  • The legend height property of plot views is now relative to the legend's text size.
  • planar view and view3D now have a new compression quality property to specify the compression quality to use when storing bitmap images into a PDF file. compression quality is a number between 0 et 5: 0=codecMinQuality, 1=codecLowQuality, 2=codecNormalQuality, 3=codecHighQuality, 4=codecMaxQuality, 5=codecLosslessQuality.
  • Clicking in a plot view which contains a curve which uses the secondary y-axis now sends, in the record passed in the pick in event, and in addition to the point key which describes the click's coordinates respective to the regular axis, a new secondary axis key which contains the secondary y coordinate.
  • planar views have a new transformation property, a list {a, b, c, d, tx, ty} to specify an optional linear transformation to apply to contour maps and to scalar maps.
Data processing
  • You can now include the functions norm, norm2 (square of the norm), sum, count and runsum inside a formula for evalformula.
  • write binary now supports an optional big endian parameter.
  • You can now convert an array of real (thus, a list of real numbers in two steps) into a list of integers using the special coercion as list of integer.
  • The fitpolynomial command supports a new optional number formatting parameter to format the numbers which make the formula returned as the fit string key in the result.
  • Passing -1 in the for parameter of extractarray now extracts the maximum number of blocks available.
  • The default value for the blocksize parameter of the insertarray command is now the size of the direct parameter, if no for parameter is provided. This makes it simpler to insert an array of real into another array of real.
  • XNFsave now has a new optional replacing parameter to specify whether attempting to save data with an existing ID into a XNF file should work or trigger an error.
Graphic library
  • Great new feature, you can now draw in overlays. Overlays are much faster, you can use them for animations.
    To draw in an overlay, use BeginOverlay(w) and EndOverlay() like you would use BeginFigure(w) and EndFigure(). The drawing occurs in a transparent window located over the graphic window w and which is the frontmost layer (like the thing displayed when you press the CD Eject key.)
    Drawing in an overlay creates an overlay (the transparent window) that you must dispose of when you are done with it by calling KillOverlay(w).
  • The DrawImage command of the graphic library now handles the image's resolution if the user does not specify a destination rectangle.
  • A new SetTextSpacing command now enables you to adapt the spacing between characters.
Interface and interface customization
  • Numerous new samples can be found in the Help ▸ SmileLab Samples. Now includes 70+ full-fledged open source demos of SmileLab.
  • You can now make floating dialogs which float above the windows of all applications by setting the new utility window property of dialogs when creating the dialog. Example: set w to make new basic object with properties {path name:FindInMoreStuff("Palette GK"), utility window:true}.
  • The new tooltip property of dialog items (previously «class Help») specifies the help string to display in the yellow floating widget.
  • The contextual menu for dialog items in edit mode now includes new items, enabling to change more settings - in particular, the item's font and colors and its tooltip property (the help string displayed when the mouse stays over the control.)
  • navchoose file name supports a new optional show package parameter.
  • Smile now supports records in the form {name:theSubMenuName, menu:theSubMenuList}, in addition to strings, as items in the list returned by CustomMenuItems, which is how you can now make sub-menus in a custom contextual menu.
  • You can set a menu item shortcuts to a function key (F1-F16): set its new glyph property to 110+(the number of the function key). For example:
    set modifiers of menu item 1 of menu "Scripts" to {"No command"}
    set glyph of menu item 1 of menu "Scripts" to 110 + 1 --F1
  • Dialogs have a new window opacity property (0 = transparent, 1 = opaque.) For floating palettes (either the floating or the utility window property is true), clicking in the palette resets the transparency to opaque (1.)
  • Dialogs now support a new background theme (an integer) to change the background color. Useful values include: -2=white, -1=black, 22=dark gray, 57=very pale blue, -3=light blue, -4=light gray blue, -5=dark blue, 19=bright blue.
  • A new register icon command now associates a file with extension .icns to a custom 4-characters code, that you can then use as the icon ID property of an icon container to have it display the icon.
  • dialogs now have a new want keydown property. When set to true, keystrokes trigger a keydown call to the dialog's script. If the keydown handler in the dialog's script make an error - for instance if you write continue keydown while no other keydown handler is defined - or if the handler is just missing, the standard handling of the keystroke is called, otherwise it is not. The same mechanism is now active also for text windows.
XML and text processing
  • The new XMLSchema and XMLRelaxNG commands validate a XML document according to a .xsd schema or a .rng relaxNG schema.
  • ⌘⌅ now validates .xsd (XML schema) and .rng (XML relaxNG) files.
  • When you open an HTML file in a Unicode window, pressing ⌥⌅ displays the web page in a web window. The same behavior is now applied to XML files which contain an XSL declaration (for instance, if they start with <?xml-stylesheet type="text/xml" href="http://xml.comp-phys.org/2001/9/QMCXML.xsl"?>.)
  • The new XMLRegexp command finds text nodes matching a given regular expression pattern.
  • The new XMLFindText command finds text nodes containing a specific string.
  • The regular expression engine in ufind text and uchange was completely revamped. You can now select one of several regular expressions syntaxes available, by setting the application's property regexp syntax to one of the selectors in "POSIX", "POSIX_EXTENDED", "EMACS", "GREP", "GNU_REGEX", "JAVA", "PERL" or "RUBY" (the default.) The optional parameter regexpflag now supports "FIND LONGEST" and "FIND NOT EMPTY".
  • The sortarray command now sorts any list instead of working only on lists of arrays of reals.
  • The new PlistAdd command concatenates p-lists (arrays or dictionaries, which correspond respectively to AppleScript's lists and records.) The after and before parameters let you imitate the behavior of AppleScript's records concatenation.
  • A new XMLSetXML command was introduced to set the content of any XML node to a string. (XMLSetText is only for textual nodes.)
  • You can now define pools of XML documents. You specify a pool by providing its name (a string) as the optional in pool parameter of the XMLOpen command. You can list the documents related to a given pool with XMLListDocuments. The default pool's name is the empty string "".
  • The plist commands which supported the index and key parameters now support an alternate using parameter where you can specify a slash-separated path.
  • You can now use PlistGet alone to get a value stored in a p-list, rather than having to proceed in two steps where you had to use PlistChild.
  • The new command XMLTagName returns the name of a XML node.
  • XMLTransform now works also on any XML node (in addition to working on XML documents.)
  • You can handle plist documents relatively to their paths with the new PlistURL and PlistDocument commands.
  • The new XMLIndexDocument command indexes or re-indexes a document. Use this command to speed up XMLTransform and XMLXPath when an expression involves node ordering.
  • The new XMLc14n saves a XML document in its canonical form. (You may want to use the canonical form, for instance, when you compare two XML documents.)
  • The new command parseFormURL makes a URL as provided by a POST or a GET request from a html form into a plist.
  • PlistNewChild now makes an empty element of type dictionary if used without a direct parameter - like PlistNew used to do.
  • A new PlistBinaryFormat returns a boolean value which specifies whether the plist file was stored as binary.
  • XMLGetAttribute now supports a list of XMLRef as its direct parameter to get the attributes of a collection of nodes.
    XMLGetAttribute and XMLSetAttribute now support lists of strings (in addition to single strings) as the name and as the to parameters. If XMLGetAttribute makes an error for some item, the corresponding item in the output is set to missing value.
  • The new encode entities command replaces the 5 reserved XML characters in the direct parameter with the corresponding XML entities.
  • A new resolve entities command substitutes the XML character entities found in the direct parameter (not the html entities such as é) with the corresponding Unicode characters. For example, resolve entities "Press the ⌅ key" will return "Press the ⌅ key".
  • The new strftime command makes a date into whatever formatted string you may need. Check man strftime for the detailed information about the options.
    strptime makes the inverse task, making a string into an AppleScript date.
  • find text, change, ufind text, and uchange support a new for parameter to restrict the search to a substring.
  • The name of the xsl variables parameter of the XMLTransform command was changed to xsl params.
More comfort
  • Smile does no longer require that the decimal separator be set to period ".". However AppleScript makes it advisable to work with period as the decimal separator if you want to make use of the do script command.
    Smile assumes that all real numbers are written with "." as the decimal separator. Only when the system's decimal separator is set to comma "," you may use numbers with the comma in the editable text fields.
  • The print command now prints PDF files, so you can print files without a dialog box. The new duplex property enables two-sided printing - if your printer supports it (only in Tiger or higher.)
  • You can now make html browser windows in Smile: that is the new web window class.
    set w to make new web window with properties {bounds:{10, 40, 500, 500}, path name:"http://www.apple.com"}
    Pressing option-Enter (⌥⌅) in a html file open in a Unicode window displays the html in a new web window, or updates the web window.
  • The new callJavaScript and callJavaScriptFunction commands make the bridge between AppleScript and javascript in Smile's web windows.
  • The ▸ More Smile commands ▸ Dialogs ▸ Make stand-alone application user script was reviewed and it can now make an existing dialog into a palette dedicated to any given application.
  • The applets and droplets that you make with Smile are now bundles, where you can store various files, including the script itself and an icon.
  • The html files which make Smile's help system will now open in your favorite browser (used to be in Smile) when double-clicked (for instance, if SpotLight found one.)
  • A new show alert command displays an alert message. Use show alert rather than display dialog to display a possibly long string. (Smile uses internally show alert to display error messages.)
  • A new show sheet command displays an alert message in a sheet attached to a window. (Smile does not use sheets to display a 'Save file' dialog.)
  • The snapback tool (in the user scripts menu) is now global (it no longer works on a per-window basis.) It stores several snap locations, and you can cycle between all the locations. Furthermore it's still tinier than before so we made a visual effect to evidence its opening.
  • A new scrollbar offset read-only property of windows now returns the current position of the scroll bars (a list of two integers) in text windows, script windows, and graphic windows.
  • The new plist properties of any object now returns, in a string, the object's list of properties as a plist. Conversely you can set the properties of an object using a plist as generated by XMLLib's commands.
  • Smile now receives a switched to event (that you can handle) whenever the user switches between applications.
Installation and documentation
  • The folder /Applications/Smile/ includes a new Smile server folder with some material related to the use of Smile as a CGI server.
  • The installer now installs two template projects. Four Xcode projects are now provided as examples located in /Applications/Smile/.
Productivity enhancement
  • A new Smile over IP Suite is to have several Smile applications communicate and collaborate, asynchronously if needed, between remote computers: install server port, call remote port, resume server task, and remove server port.
    Other commands are to publish and handle a list of published services: register server port, unregister server port, list registered ports.
    Here is a simple explicit example.
    Import script

    -- the handler in the server's machine
    -- processes the request and
    -- returns the result (possibly after some time)

    on handleQuery(req, theRequestId)
        quietmsg("Received request: " & req)
        postit "Suppose the answer comes late …"
        smilepause 3
        postit ""
        if req is "what time is it" then
            return time string of (current date)
        else if req is "what day are we" then
            return date string of (current date)
        else
            return "unknown command"
        end if
    end handleQuery

    -- the handler in the client's machine
    -- receives the result from the server

    on handleReply(resultReceived)
        quietmsg("Received reply: " & resultReceived)
    end handleReply

    -- installation of the service on the server
    install server port 29556 subroutine "handleQuery"

    -- call to the service from the client
    call remote port 29556 with data "what time is it" subroutine "handleReply"
  • The new parseFormURL command makes a POST or GET html request into a p-list, so you can receive and process in Smile a request with the smile:// protocol sent from a browser in a form.
  • smilepause was changed. The previous command was renamed smilepause obsolete. In the new command you can specify separately the two options: whether the esc key will trigger a User canceled error, and whether the right arrow (‣) will return from smilepause, resuming the execution of the script. The new smileresume commands ends the current smilepause, resuming the execution of the script. If there is no smilepause active, smileresume makes a error number -1.
  • add library can now load an external script into the context of any object script (instead of loading the script into the global context), with the new using parameter.
  • A new callhandler command can now run a handler provided by its name, for instance callhandler {"hello"} subroutine "quietmsg" is like quietmsg("hello").
Files
  • The path name property of a window can now be a URL, for instance:
    make new Unicode window with properties {path name:"file:///Library/Preferences/loginwindow.plist"}
    In addition to the file protocol, http and ftp are also supported, so you can now edit a remote file in Smile.
  • Smile will now open any file that you drop on its icon.
  • When Smile opens a file with a file name extension, say .ext, Smile will call customopen_ext(f) - if that handler exists in Smile's context. This lets you open files that Smile does not handle by default, or redefine the default behavior for a specific file extension.
  • You can now merge PDF files with the new insert pdf command.
  • A new Smile files and folders Suite implements folder actions in Smile. A folder registered with subscribe folder will send a changed folder event to Smile when modified. Alternately you can force the event, with notify folder.
  • Smile now opens the binary-encoded plist files (in an XML editor window, also known as Unicode window.)
  • Smile now opens the scripts stored as a bundle (.scptd extensions or AppleScript Studio applications.) This was programmed by Julio Sanchez.
  • By default, Smile now saves scripts in the file's data fork (instead of the resource fork.)
  • navchoose file now has a new of extension optional parameter to restrict the user's selection to files with one or several file extensions.
  • The new GetUTI and UTIConform commands return the UTI (Universal Type Identifier) for a file.
  • The new key parameter of the navchoose file, navchoose file name, and navchoose folder commands associate a key to the folder that the user will select. If no starting at parameter is provided, the folder corresponding to the key provided is assumed as the default folder.
Bugs fixed in 3.1
  • The write binary command would not write data files as integer. This is fixed.
  • contour maps created using the level numbers included the contour lines corresponding to the extremal values - usually isolated points. This is fixed.
  • The pen width property of the plot views was not saved (in bundle format.) This is fixed.
  • Under some rare (but repetitive) circumstances, closing a graphic window which has a non-empty movie file property could trigger an error upon subsequent add movieframe commands. This is fixed.
  • If a drawing was defined with an OverlayDrawing handler in the script of a view, suppressing the handler would not remove the drawing. This is fixed.
  • Colors of images created with the create imagefile command did not correspond to the color palette parameter. This is fixed.
  • The GetUTI returned a bad result when called with a file type parameter. This is fixed.
  • The display of the frame of a plot view defined with a semi-transparent color was wrong. This is fixed.
  • Opening the font panel for a Unicode window then clicking in a web window would crash Smile. This is fixed.
  • Drag & drop of the controls which display an icon was broken in Smile 3.0. This is fixed.
  • Saving a graphic window as a PDF or as a bitmap image would not save the background color. This is fixed.
  • Smile would not display the comments in .plist files. This is fixed.
  • Graphic windows would not support long names for their movie file property. This is fixed.
  • MeasureTextBox would not resolve character entities (such as ✓.) This is fixed.
  • Under some rare circumstances, compute eigenvalues would leak, crash, or return erroneous results. This is fixed.
  • In some circumstances, compute determinant would make an error. This is fixed.
  • In some circumstances, Unicode windows would ask to save the changes even when there was none. This is fixed.
  • The bounds property of a window would not take into account correctly the toolbar, and windows would sometimes open with the horizontal scrollbar lower than the bottom of the screen. This is fixed.
  • In some circumstances the menu in a toolbar item would not make correctly "-" into a separation line. This is fixed.
  • A floating dialog could catch the edit mode command (⌘Y). This is fixed.
  • AskUser, dd, and FatalAlert would not display more than 254 characters. This is fixed.
  • The number of contour lines nlevels in a contour map could be set to invalid values, possibly yielding a crash. This is fixed. nlevels is now limited to 1000.
  • DrawImage and DrawPDF did not support some characters (<, >, &, and quotes) in file names. This is fixed.
  • In some circumstances the margins property of a graphic view would not be correctly initialized. This is fixed.
  • In some circumstances, the pick in event was not sent when the user releases the mouse button (step=3). This is fixed.
  • Some coercions when setting the value of a property would fail silently. This is fixed.
  • Some computational commands which use indexes (for instance, extractarray) would fail silently when out of range, instead of triggering an error. This is fixed.
  • XMLSetAttribute would allow an invalid attribute name. This is fixed.
  • printf would not handle correctly the "s" parameter (like in printf "%8s" parameters {"hello"}) nor the parametric size (like in printf "%*d" parameters {4, 10}). This is fixed.
  • cformat and printf would not display correctly very large integers with the %d option. This is fixed.
  • Getting the movie file of a graphic window would fail silently when undefined. This is fixed. Now, setting movie file to "" resets the property.
  • navchoose file name would not take into account the optional open packages parameters. This is fixed.
  • list resources did not trigger an error if no resource was available. This is fixed.
  • Hexa to decimal and Hexa to string did not handle hexa containing capital letters. This is fixed.
Known features and caveats for 3.1
  • Smile 3.1 does not work under any Mac OS 10.3.x (Panther.) If you are still running Panther (which is excellent) use Smile 3.0.6 (which is excellent.)
  • The path name property would accept to be set to an AppleScript path provided as a string instead of a file specification or an alias. Basically, this is no longer allowed - you have to specify a file specification or an alias. This is because path name can now be set to a URL - thus, a string.
Release notes for the previous versions of Smile
The release notes for the previous versions of Smile are available in separate pages.
Previous | Next
Copyright ©2007 Paris, Satimage