Link Expressions

This illustrates examples of link expressions that can be used in Newt's Cape 1.5e (or greater). Currently, this assumes that the book is standalone, or that Newt's Cape is installed and NewtonScript compile is on.

advmeta.htm illustrated simple use of appSymbol as a link to open an installed application. This has been extended to include a message and parameters (or global function). For more complicated behavior, you can define links which are methods. The basic formats are:

appSymbol
toggle an application (opens or closes). same appSymbol/toggle (see next)
appSymbol/message
sends a message (with no parameters) to an application
appSymbol/message?param1,param2,param3
sends a message (with 3 parameters) to an application
appSymbol/message?slot1=value1&slot2=value2
sends a message with 1 frame parameter to an application; this format is provided for "compatibility" with CGI scripts\ (though it does not do any conversion of URL encoded quoted values). this is the same as appSymbol/message?{slot1: value1, slot2: value2}. currently, there would be a problem if you wanted to use = or & characters in either format
function?param1,param2,param3,param4
call a global function (with 4 parameters)
function?slot1=value1&slot2=value2&slot3=value3&slot4=value4
call a global function with 1 frame parameter

Examples: (note: Print examples assume NTK Inspector(Connected), NewtDevEnv(Print? on) or Sloup(Inspect? on)


This document (in all its formats) is © 1997-2007. Steve Weyer. All Rights Reserved Worldwide. You are free to incorporate this into your own documents, but I would appreciate an acknowledgement of Newt's Cape and the example.

Last updated: Dec 2000