Core commands changes

This document contains a list of all the core commands which were implemented in version 8.2 of Alpha and provides information about their new status in Alpha: some commands have been obsoleted, others have undergone syntax changes or remain unchanged.

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z

A

abbrev

This command is obsolete.

abbreviateText

The syntax has been modified to be consistent with the [getTextDimension] command. There is a new option -break to indicate where to truncate the string. The new syntax is:
    abbreviateText ?-font dict? ?-break mode? string width

abortEm

This command is obsolete. Use the [status abort] command instead.

addHelpMenu

This command is obsolete. Use the [menuRef] command instead.

addMenuItem

This command is obsolete. Use the [menuItem] command instead.

alert

Old syntax:
    alert ?-t stop|caution|note|plain? ?-k okStr? ?-c cancelStr? ?-o otherStr? 
                ?-h? ?-K ok|cancel|other|help? ?-C ok|cancel|other|help|none?
                title ?explanation?
New syntax:
    alert ?-w win? ?-t critical|info|warning? ?-k okStr? ?-c cancelStr? \
                ?-o otherStr? ?--? title ?explanation?
The values for the -t option have been renamed critical, info and warning. The -C and the -h are not supported anymore. The command now supports a -w option to display the alert in a sheet window attached to the specified document window.

alertnote

The command now supports a -w option to display the alert in a sheet window attached to the specified document window.

alpha::blink

This command is obsolete. Use the [blinkPos] command instead.

alpha::copyRegion

This command is obsolete. Use the [text copy] command instead.

alpha::cutRegion

This command is obsolete. Use the [text cut] command instead.

alpha::executeURL

This command is renamed [executeURL]. It accepts an option -b to specify the bundle identifier of the application to use in order to open the URL.

alpha::pasteRegion

This command is obsolete. Use the [text paste] command instead.

ascii

This command is obsolete. Use the [binding] command instead.

B

backSpace

Syntax unchanged.

backwardChar

Syntax unchanged.

backwardCharSelect

Syntax unchanged.

backwardDeleteWord

Syntax unchanged.

backwardWord

Syntax unchanged.

backwardWordSelect

Syntax unchanged.

balance

Syntax unchanged.

beep

This now only emits a system beep. The -volume and -list options have been removed.

beginningBufferSelect

Syntax unchanged.

beginningLineSelect

Syntax unchanged.

beginningOfBuffer

Syntax unchanged.

beginningOfLine

Syntax unchanged.

Bind

This command is obsolete. Use the [binding] command instead.

binding

The syntax is unchanged. See

bindingList

This command is obsolete. Use the [binding list] command instead.

bringToFront

Syntax unchanged.

buttonAlert

One can now specify an arbitrary number of buttons (it was previously limited to 5). There is a new -title option. The command now supports a -w option to display the alert in a sheet window attached to the specified document window.

C

capitalizeRegion

This command is obsolete. Use the embrace package instead.

capitalizeWord

Syntax unchanged.

centerRedraw

Syntax unchanged.

clearUndo

Syntax unchanged.

colorTagKeywords

This command is obsolete. Use the [modeColoring] command instead. Lists of keywords or regular expressions can be registered with [modeColoring register] and deleted later with [modeColoring unregister].

colorTriple

This command is obsolete. Use the [colorRef pick] command instead.

coreKeyPrompt

This command is obsolete. Use the new [getKey] command with options -c and -m instead instead. The prompt string can be specified via the -p option.

createTMark

This command is obsolete. Use the [mark add -temp] command instead.

cvttime

D

deleteChar

Syntax unchanged.

deleteMenuItem

This command is obsolete. Use the [menuRef] and [menuItem] commands instead.

deleteModeBindings

This command is obsolete. Use the [binding delete] command instead.

deleteSelection

This command is obsolete and replaced by the new [selection delete] command.

deleteText

This command is obsolete. Use the [text delete] command instead.

deleteWord

Syntax unchanged.

describeBinding

This command is obsolete. Use the proc [binding::describe] instead.

dialog

This command is obsolete. Use the [view] command instead.

display

displayEncoding

This command is obsolete.

displayMode

Syntax unchanged.

displayPlatform

Syntax unchanged.

downcaseWord

Syntax unchanged.

dumpColors

E

enableMenuItem

This command is obsolete. Use the [menuItem] command instead.

endBufferSelect

Syntax unchanged.

endLineSelect

Syntax unchanged.

endOfBuffer

Syntax unchanged.

endOfLine

Syntax unchanged.

ensureTextWasColoured

execAbbrev

This command is obsolete.

execute

This command is obsolete. Use the [status execute] command instead.

F

floatIcon

This command is obsolete. Use the new [view] command instead to build a window with icons or images.

floatMenu

forwardChar

Syntax unchanged.

forwardCharSelect

Syntax unchanged.

forwardWord

Syntax unchanged.

forwardWordSelect

Syntax unchanged.

G

getChar

This command is obsolete. Use the new [getKey] command with option -c instead.

getColors

This command is obsolete. Use the new [getEscapes] command instead.

getDirectory

The [getDirectory] command supports a new option -multi to allow selection of multiple folders.

getFile

The [getFile] command supports new options:

getFileInfo

Old syntax:
    getFileInfo <file> <arr>
New syntax:
    getFileInfo file option
The list of supported options has changed. Available options are now: all, bundle, busy, created, creator, datalen, flags, group, hidden, modified, owner, type.
The all option returns a dictionary: this is a possible replacement for the array filled by the old syntax.
The resourcelen option is not supported anymore. Use the Tclresource extension instead.

getGeometry

Syntax unchanged. The returned list corresponds to the x-coord, y-coord, width, and height of the content rectangle of the window.

getLocation

The -warn option has been removed. There does not seem to be a possibility of avoiding the warning on existing file in Cocoa.

getMainDevice

The command now supports a -v option in order to get only the visible frame. The returned coords are the x-coord and y-coord of the origin and the width and height of the rectangle (previously it was the left, top, right, and bottom).

getModifiers

The syntax is unchanged but the returned value is different. It is a combination of the following base-2 flags:
AlphaShift0x011
Shift0x022
Control0x044
Alternate0x088
Command0x1016
NumericPad0x2032
Help0x4064
Function0x80128

getNamedMarks

This command is obsolete. Use the [mark list] command instead.

getPin

Syntax unchanged.

getPos

Syntax unchanged.

getPosOfMark

This command is obsolete. Use the [mark pos] command instead.

getPosOfTMark

This command is obsolete. Use the [mark pos -temp] command instead.

getScrap

getSelect

This command is obsolete and replaced by the new [selection get] command.

getStandardFolder

getText

This command is obsolete. Use the [text get] command instead.

getTextDimensions

This command is obsolete. Use the [text dimensions] command instead. The -size and the -w options have been removed. The -font option is now specified as a Tcl dictionary. The returned value is a two-elements list containing the width and the height of the enclosing rectangle.

getTMarks

This command is obsolete. Use the [mark list -temp] command instead.

getVolume

This command is obsolete.

getWinInfo

Old syntax:
    getWinInfo ?-w win? <arr>
New syntax:
    getWinInfo ?-w win? option
The list of supported options has changed. Available options are now:
The all option returns a dictionary: this is a replacement for the array filled by the old syntax.
The following options are not supported anymore: metal, needsWrap.
The saveState option has been renamed recordState and is now a boolean (0 or 1) instead of a string ("none" or "mpw").
Some options have been renamed:
busyspin
currlinecurrLine
read-onlyreadOnly
linesdispnumDispLines
staterecordState
The fontsize option has been removed: this information is now included in the dictionary set via the font option.

goto

Syntax unchanged.

gotoColumn

This command now accepts an optional argument to specify the target column. If it is not specified, the command is asynchronous and prompts the user to enter a value.

gotoLine

This command now accepts an optional argument to specify the target row. If it is not specified, the command is asynchronous and prompts the user to enter a value.

gotoMark

This command is obsolete. Use the [mark goto] command instead.

gotoTMark

This command is obsolete. Use the [mark goto -temp] command instead.

H

hiview

This command has been renamed [view] and has a different syntax. It also supports a larger set of widgets.

I

icGetPref

This command is obsolete.

icon

iconref

This command is obsolete. It has been replaced by the [imageRef] command.

icOpen

This command is obsolete. Use [executeURL] to open an URL.

insertAscii

This command is obsolete. Use the [insertUnicode] command instead.

insertColorEscape

This command is obsolete. Use the [insertEscapes] command instead which offers much more possibilities (many kinds of underlines, strike through, spelling marking).

insertMenu

This command is obsolete. Use the [menuRef] command instead.

insertText

This command is obsolete. Use the [text insert] command instead.

insertToTop

Syntax unchanged.

iterationCount

This command is obsolete.

J

K

keyAscii

This command is obsolete. Use the new [getKey] command with option -u instead.

keyCode

This command is obsolete. Use the new [getKey] command with option -k instead.

killLine

Syntax unchanged.

killWindow

Syntax unchanged.

L

largestPrefix

lineStart

This command is obsolete. Use the [linePos start] command instead.

linkVar

Syntax unchanged.

listpick

Syntax almost unchanged. The -multiValue option is renamed -multi and is still synonym of the old -l option.

lookAt

M

macro::_current

macro::_endRecording

macro::_startRecording

markMenuItem

This command is obsolete. Use the [menuItem] command instead.

matchBrace

Syntax unchanged.

matchIt

Syntax unchanged.

maxPos

Syntax unchanged.

Menu

This command is obsolete. Use the [menuRef] command instead.

menuBar

The subcommand submenus has been removed.

menuItem


Some
[menuItem create] options have been removed: -ignoreMeta, -parentChoosable, -header.
The -dynamic and -notAlternate options are replaced by the single -alternate option.
A new -state option is available: possible values are 0 (off state), 1 (on state), or -1 (mixed state).
A new -tip option is available.
A new -tag option is available.
A new -color option is available.
The [menuItem check] has been removed. Use the new -state option instead, in order to put a check mark in front of an item.

menuNames

This command is obsolete. Use the [menuBar] command instead.

menuRef

The meaning of the -attr option in [menuRef create] has changed. The subcommand [menuRef hilite] has been removed.
The [menuRef list] command now supports a -name option in order to find a menu token given its name.

mousePos

This command now accepts an -s option to get the mouse position in screen coordinates. Otherwise it is unchanged.

moveInsertionHere

Syntax unchanged.

moveWin

This command now supports the -w argument. Old syntax
    moveWin ?$win? <left> <top>
New syntax
    moveWin ?-w $win? <left> <top>

mtime

The syntax is unchanged but there are additional formats: 'full', 'offset' and 'standard'. The 'short', 'abbrev' and 'long' formats are still supported.

N

nameFromAppl

This command is obsolete. Use the [getAppInfo path] command instead.

new

This command is now defined as a proc based on the [openWindow] core command.

nextLine

Syntax unchanged.

nextLineSelect

Syntax unchanged.

nextLineStart

This command is obsolete. Use the [linePos next] command instead.

now

The [now] command accepts two additional options: -unix and -abs.

O

oneSpace

openFile

The command now accepts a -geom argument like the command [openWindow].

oneSpace

Syntax unchanged.

openLine

Syntax unchanged.

P

pageBack

Syntax unchanged.

pageForward

Syntax unchanged.

pageSetup

The command now supports the -w option.

posToRowCol

The command now supports a -v option (v stands for virtual). When this option is specified, the column indices take the size of the tabulations into account. Otherwise, the column index is just the number of characters starting from the beginning of the line.

prefixChar

previousLine

Syntax unchanged.

prevLineSelect

Syntax unchanged.

prevPos

Syntax unchanged.

print

The command now conforms to the -w option: one must now write print -w $win instead of print $win.
There is a new option -ask to specify whether the print panel should be displayed. The default value is 1. If -ask is set to 0, the document is printed directly without displaying the print panel.

progressBar

prompt

The -sheet option has been removed: it was unused and incompatible with the synchronous character of the command.

putScrap

Q

quit

Syntax unchanged.

R

rectangularHiliteToPin

redo

Syntax unchanged.

refresh

Syntax unchanged.

regModeKeywords

This command is obsolete. Use the [modeColoring] command instead.

regPrefixChar

This command is obsolete. Use the [prefixBinding] command instead with the -infix option: it offers better control on the form of the infix. See the Bindings with an infix section in the reference of the [binding] command.

removeColorEscapes

This command is obsolete. Use the [removeEscapes] command instead which is much more flexible: it can perform selected removal on a specified range.

removeMenu

This command is obsolete. Use the [menuRef] command instead.

removeNamedMark

This command is obsolete. Use the [mark remove] command instead.

removeTMark

This command is obsolete. Use the [mark remove -temp] command instead.

renameMenuItem

This command is obsolete. Use the [menuRef] and [menuItem] commands instead.

replaceText

This command is obsolete. Use the [text replace] command instead.

responsiveness

This command is obsolete.

revert

This command supports a new -ask argument to present an alert giving the user the opportunity to cancel the operation.

rowColToPos

The command now supports a -v option (v stands for virtual). When this option is specified, the column indices take the size of the tabulations into account. Otherwise, the column index is just the number of characters starting from the beginning of the line.

S

save

The [save] command now uses the -w option to specify a particular document window.

saveAll

The command now supports a new -f option to save only windows corresponding to a file on disk.

saveAs

The command now supports new -ask and -encoding options. The meaning of the -f (or -file) option has been modified and depends on the value of the -ask option (see the documentation). The command supports the -w option.

saveResources

scrollDownLine

This command is obsolete. Use the [scroll] command instead.

scrollLeftCol

This command is obsolete. Use the [scroll] command instead.

scrollRightCol

This command is obsolete. Use the [scroll] command instead.

scrollUpLine

This command is obsolete. Use the [scroll] command instead.

search

Syntax unchanged. The returned value has changed when the option -all is specified: it previously returned a flat list of positions successively corresponding to the start and end of each correct match. Now it returns a list of two-element sublists which is suitable for use with the [selection] command.

selectText

This command is obsolete and replaced by the new [selection add] command.

selEnd

Syntax unchanged.

setFileInfo

Old syntax:
    setFileInfo <file> <field> [arg]
New syntax:
    setFileInfo file option value [option value...]
The list of supported options has changed. Available options are now: busy, created, creator, group, modified, owner, type.
The resourcelen option is not supported anymore. Use the Tclresource extension instead.

setNamedMark

This command is obsolete. Use the [mark add] command instead.

setPin

Syntax unchanged.

setRGB

setWinInfo

Old syntax:
    setWinInfo ?-w win? <field> [arg]
New syntax:
    setWinInfo ?-w win? option value [option value...]
The list of supported options has changed. Available options are now:
There is a new option named encoding.
The following options are not supported anymore: metal, mro, needsWrap. The fontsize option has also been removed: this information is now included in the dictionary returned by the font option.
Some options have been renamed:
busyspin
read-onlyreadOnly
staterecordState

sizeWin

This command now supports the -w option. Old syntax:
    sizeWin ?$win? <width> <height>
New syntax:
    sizeWin ?-w $win? <width> <height>

specToPathName

This command has been removed: file specs do not make sense on Mac OS X.

startEscape

This command is obsolete.

status::flash

This command is obsolete.

status::msg

The syntax is unchanged. This command is now implemented as a Tcl proc in AlphaTcl. See the more flexible command [status message].

statusPrompt

This command is obsolete. Use the [status prompt] command instead.

switchTo

The target application can now be specified by bundle identifier, name, process ID or signature via the options -b, -n, -p and -s respectively. The new syntax is:
    switchTo (-b|-n|-p|-s) value
If the application is not already running, the command will launch it if it is available on the machine.

T

tab

ticks

The ticks command now returns a value in milliseconds rather than in 60ths of a second previously. It accepts two new options : with -m the returned value is in microseconds and with -n it is in nanoseconds.

toolbar

The -remove option is not supported anymore in [toolbar create]. The -canRemove and -select options are not supported anymore in [toolbar set]. Similarly the -bar and the -w options do not make sense anymore in [toolbar set].

U

unascii

This command is obsolete. Use the [binding delete] command instead.

unBind

This command is obsolete. Use the [binding delete] command instead.

undo

Syntax unchanged.

unicodeNormalize

Syntax unchanged.

upcaseWord

Syntax unchanged.

V

version

This command is obsolete. Use the [getAppInfo version] command instead. (

W

watchCursor

This command is obsolete.

win::Current

This command is renamed as [winCurrent].

windowVisibility

The syntax is unchanged.

winNames

The options supported by this command have been modified. The -f option is renamed -fullpath (but can still be abbreviated as -f). The -fnocount option has been replaced a -nocount option. In order to achieve the effect of the old -fnocount option, specify both -f and -nocount.
The new syntax is :
    winNames ?-fullpath? ?-nocount?

winPane

Syntax unchanged.

wins

This command is obsolete.

winStatus

This command is obsolete.

Y

yank

This command is obsolete.

Z

zapNonPrintables

This command is obsolete.