SuperTalk

SuperTalk

SuperTalk is the scripting language used in SuperCard. SuperTalk is a descendant of HyperTalk.

Extensions to the HyperTalk base language

Additional syntax

One of the most powerful features SuperCard adds to the HyperTalk language are "user properties". Where HyperTalk had a fixed set of properties on its objects, SuperCard scripters can use the define property propName command to add new properties to buttons and fields. These properties can contain arbitrary text (including numbers and object references, which are also represented using text in xTalks), and even dumps of entire files.

SuperTalk provides several variations on HyperTalk's answer and answer file commands, which let you choose several items from a list, choose an icon from all available icons, pick a MIDI instrument to play sound with, or choose a file of a supported image format (including a preview), or disks and folders. Different from HyperTalk's dialogs, SuperTalk answer and ask dialogs do not all resize dynamically to hold more text. However, since SuperCard allows having cards (i.e. "pages") in windows of arbitrary types, one can easily build one's own dialog that is large enough. SuperTalk also has an alert command that displays standard system alert windows and sheets, including standard system icons.

A switch command is available for more readability in complex conditionals, and various types of media can be recorded (e.g. screen grabs of a card, sound and QuickTime movies). There is also a clone command that is equivalent to copying and pasting but leaves the clipboard unchanged, an enumeration command that creates global variables with sequential integer values, and recently MetaCard's familiar repeat for each item x command for iterating through lists was added.

SuperCard also offers exception handling using a try statement with associated throw command.

Differences and incompatibilities

SuperTalk came with a source-level debugger well ahead of HyperCard, but the SuperTalk debugger is a modal window and does not let you set breakpoints by just clicking beside a line. A special trace command is used to enter the debugger, where one can then view the currently executing line of code, execute commands, evaluate expressions etc. Because of that, the SuperTalk debugger has to be explicitly turned on instead of being available right away when a script error occurs.

The visual effect command is a little stricter in its syntax, but in exchange supports numerous additional transition effects, including QuickTime transitions and special plug-in modules (stored in data fork resources of type TRAN). A special kind of external command that does not get unloaded and can own a window has been added. Its type is XRTN. It differs noticeably from the XCMD protocol, and also doesn't use the xWindoid protocol later introduced for adding windows to HyperTalk.

SuperTalk also uses a launch command for starting up external applications, different from HyperTalk's open command, which SuperTalk uses for opening its various windows (HyperTalk deviated here by using go to stack "foo" in new window).

Richer object model

Of course SuperTalk also exposes SuperCard's expanded object model, making it possible to create sliders, scroll bars, progress indicators and other scales, scriptable paint and draw graphics, and native listbox and first-class menu objects. Multiple windows with several styles (modal panel, non-modal, scrolling, resizable..., floating palettes) are also available and focus and activation scope can be modified under full script control.

Deviations

Some parts of SuperCard deviate from the English-like-ness of HyperTalk. This includes the alert command, which tried to emulate the slightly awkward syntax of the answer command a bit too much. Also, it seems that over time, a number of XCMDs were simply rolled into the engine as built-in commands, maintaining the not very memorable handler call syntax. The most obvious case here is the movie function, where movies are kind of "invisibly tacked on" to a window instead of being implemented as real controls like sliders or other elements. There are also some properties that control general application behaviour that are one-to-one translations of the underlying system APIs, e.g. for using "appearance manager" (the themeing engine in Mac OS 9).


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Supertalk Mississippi — Supertalk Mississippi, also known as The Super Talk Mississippi Radio Network or simply Supertalk, is a statewide, commercial news and talk radio network based in Jackson, Mississippi. Its flagship station is WFMN (Flora/Jackson). Supertalk… …   Wikipedia

  • WFTK — Infobox Radio station name = WFTK FM city = Lebanon, Ohio area = Cincinnati, Ohio branding = 96 Rock slogan = Cincinnati s Pure Rock airdate = 1958 frequency = 96.5 (MHz) format = Active Rock erp = 19,500 watts haat = 247 meters class = B… …   Wikipedia

  • WKY — Infobox Radio station name = WKY city = Oklahoma City area = Oklahoma City Metroplex branding = Jox 930 WKY slogan = Now We re Talking Sports! airdate = 1922 frequency = 930 kHz power =5,000 watts format = Sports Radio class = C owner = Citadel… …   Wikipedia

  • SuperCard — Infobox Software name = SuperCard caption = SuperCard Screenshot developer = Solutions Etcetera latest release version = 4.6.2 latest release date = 2007 operating system = System Software 6, System 7, Mac OS 8, Mac OS 9, Mac OS X genre =… …   Wikipedia

  • Pete Rock — Infobox musical artist Name = Pete Rock Img capt = Pete Rock, October 2007 Img size = Landscape = Pete Rock, October 2007 Background = solo singer Birth name = Peter Phillips Alias = Soul Brother #1 The Chocolate Boy Wonder Born = birth date and… …   Wikipedia

  • Charleston, West Virginia — Not to be confused with Charles Town, West Virginia. City of Charleston   City   …   Wikipedia

  • English language idioms derived from baseball — B = * ballpark: in the ballpark, ballpark figure, and out of the ballpark mdash; Ballpark has been used to mean a broad area of approximation or similarity, or a range within which comparison is possible; this usage OED dates to 1960. Another… …   Wikipedia

  • WFOM — Infobox Radio station name = WFOM city = Marietta, Georgia area = Atlanta metropolitan area branding = Super Talk 1230 slogan = airdate = frequency = 1230 kHz format = News/Talk/Sports power = 1,000 W daytime/nighttime erp = class = C callsign… …   Wikipedia

  • WWTN — Infobox Radio Station name = WWTN city = Manchester, Tennessee area = Nashville, Tennessee branding = SuperTalk 99.7 WTN slogan = Accurate News and Stimulating Talk airdate = March 29, 1979 frequency = 99.7 (MHz) format = News/Talk power =… …   Wikipedia

  • WTOD — Infobox Radio Station name = WTOD city = Toledo, Ohio area = Toledo metropolitan area branding = SuperTalk 1560 slogan = The Voice of Toledo frequency = 1560 (kHz) airdate = June 16, 1946 (as WTOD) format = Talk callsign meaning = Top Of the Dial …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”