smilesheet.htmlTEXTVIZF ϴ Smile sheets

Smile sheets

What is a Smile sheet ?

A Smile sheet is simply a text window with button (s) installed and, possibly, an object script .

Creating a new Smile sheet

- Create a new text window with the "New text" menu.
- Create a new button on it.
- If needed, provide an object script .

Usually, a sheet is dedicated to some particular task, so it is often natural to define some common handlers and properties in the object script of the window, which may be called from the buttons' scripts.

Opening a Smile sheet

Smile sheets are text windows and can be opened the same way as any text window. Frequently used sheets may be put in the "User scripts" folder, so that they can be opened by menu.

Making your sheets more powerful

Setting persistent data
You can store data in the properties of the sheet's script. The data will be saved when you save the window. Note that however they will be reset if the script is re-compiled.
You can also store data directly into the properties of the window. Use the special property 'extras', which is a placeholder designed to store any user (AppleScript) data. This property is saved when you save the window.

More custom behavior
You may want to customize also the standard behavior (i.e., as a text window) of the sheet. This can be done by installing standard AppleEvents handlers in the object script of the sheet. See Guide to Smile dictionary for more info.

For instance, the handler :
----------------------------
on close theWindow saving whatever
continue close theWindow saving yes
end close
----------------------------

can be installed in the script of the sheet to force saving of the changes when the window is closed.

Providing help in a sheet
If you install a 'DoHelp' handler in the script of the sheet it will be called when the user presses the 'Help' key. The 'DoHelp' handler must conform to the following syntax.
----------------------------
on DoHelp (theWindow)
-- provide any required help
end close
----------------------------
where Smile passes in 'theWindow' a reference to the sheet itself.

See also button to install help in a button, which is available when the user selects "Help" in its contextual menu.

 p p_ !Received: from send.memail.com (send.memail.com [206.196.80.81]) by imaginet.fr (8.8.8/8.8.8) with SMTP id GAA08311 for ; Fri, 4 Feb 2000 06:59:42 +0100 (MET) From: "Joke of the Day" To: joker@e    k   k  /  k    k    G  V  Z  d                  kK  i  ky    k            k  4  c  t  x  }  k    k  &  k=    kA  e  kx    k  N  kR  3  k >  V  k ^    1  B  F  ]      k   k    k   ?  k n   k   k   k  ;  k F  c  k k    k "  B  k F  _  k   k   k   k  .  k6  C  l  v  z    k  ~selelist longlongpbndlist8long9longlonglongLBDrwfalspvistrueWIDLfalsICFFlongrSiDlongptxfTEXTGenevaptpslong Rectlist8longlonglonglongWTBHlongRqULlongLWdtlongBrWdlongAuAdfalsTbSzlong  p p_@6ZZstylSOUP&reco2A4cwtx