Style is in the Details
Last updated on August 12, 2002
Automatic Line Break Translation
Editing Files on FTP Servers
Find by Content Searches
Long File Names
Different operating systems use different conventions for marking the end of a line or a paragraph. For instance, Windows uses pairs of control characters known as CR/LF (for Carriage Return / Line Feed) to separate lines of text. The Unix convention is to use LF characters alone. Finally, Macintosh applications use CR characters alone.
Pretty messy, huh? But wait, there's more. These are just the conventions for ASCII-based text. Unicode introduces its own control characters, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR, although a lot of Unicode text files around still use the old ASCII-derived conventions for historical reasons. So we have three or four different line break styles to deal with.
Style will automatically detect the line break style when opening a text file, silently convert the text to Macintosh-style line breaks while it's being edited, and convert it back to the original style when the document is re-saved. The line break style is a scriptable property of documents, so you can write scripts to manipulate line breaks at will.
Style can interoperate with some ftp client applications (such as NetFinder) to make it easy to quickly edit files on remote servers via ftp (file transfer protocol). This feature is especially handy for quick changes to web pages and Unix configuration files.
When you browse a remote directory using such ftp programs, you can select a remote file and choose a menu command that will download the file and open it in Style, where you can edit it. When you later save your changes, the modified file will be automatically uploaded back to the remote server by the ftp program (see here for a technical explanation of how this works).
You can tell at a glance files coming from remote servers because the URL is displayed in the window header, as shown below:
Files from remote servers are listed in the Open Recent submenu, just like local files. When you choose the corresponding entries in the submenu, Style will ask your favorite ftp client to download the file again and initiate another editing session.
Dragging the window proxy icon of a file coming from a remote server to the desktop will create an ftp location clipping, rather than moving the file.
Sherlock, introduced in Mac OS 8.5, lets you search files on your local disks by content, provided disks have been indexed. You can enter one or more keywords, press the Search button, and after a few seconds, a list of matching documents is displayed, sorted by relevance.
But once you find a document based on its contents, you typically want to open that file and jump right to the found text. With most applications, this is done by double-clicking the document entry in Sherlock, which opens the document in the corresponding application, then using the application's built-in search feature (if any) to look for the desired keyword within the document. In other words, you have to enter the same keyword twice, once in Sherlock and again in the application.
Style is different. Double-clicking a Style document in the list of matches generated by Sherlock opens the file and automatically hilites the first occurrence of the keyword, scrolling it into view if necessary. Also, the keyword is automatically entered in Style's Find dialog, so that typing command-G (for Find Again) at this point hilites the second occurrence of the keyword, and so on.
This works because Sherlock adds an extra parameter to the standard "open document" Apple event sent to applications (see here for a technical explanation). This extra parameter tells the application what keyword the user is looking for. Unfortunately, few applications support this protocol introduced back in Mac OS 8.5. Fortunately, Style is one of them.
Mac OS Extended Format (aka HFS+) volumes, available since Mac OS 8.1, are capable of storing long file names (up to 255 characters). While the classic Finder and Mac OS have very limited support for this feature, long file names can be easily entered in Mac OS X.
If you browse a volume used by Mac OS X with the classic Finder, chances are you'll see names like "StuffIt for Mac OS X R#33E8.rtf". This is not the real name: it's a shortened name fabricated by the System for compatibility with applications (like the classic Finder) that don't support long names. The strange-looking embedded ID ("#33E8") allows the system to retrieve the real name when needed. If you open such a file with Style, the unabridged name (e.g., "StuffIt for Mac OS X Read Me.rtf") will appear in the window title.
MPW Projector was one of the first version control systems available for the Macintosh. A version control system is a tool used mostly by programmers to keep track of changes to files, maintaining a history of what files in a project are changed, when, by whom and why. One of the duties of a version control system is to prevent multiple concurrent users from modifying the same file at once. To achieve this goal, MPW Projector marked files with a special resource (the 'ckid' resource) that tells editors whether a file can be modified or should be treated as read-only. This 'ckid' convention is honored by most programmer-oriented tools for the Macintosh and is exploited by other version control systems as well.
Style will honor and preserve 'ckid' resources in any files it can edit. If a file contains a 'ckid' resource, Style will display its Projector state in the Get Info dialog, as shown below:
RTF (short for Rich Text Format) is a format originally designed by Microsoft as an exchange format for word processors, notably Microsoft Word. Over the years, it's been adopted by several other vendors and it has significantly grown in complexity. Style only supports a small subset of RTF, enough to preserve all the formatting attributes currently defined by WASTE.
RTF is used not only as a file format, but also as a clipboard format. Some applications, like Microsoft Word and the TextEdit application in Mac OS X, put RTF data on the clipboard in addition to plain text or styled text. This RTF data usually provides a richer and more accurate representation of the original text, so when given a choice, Style will prefer the RTF data over any other existing flavors.
If you have an Internet connection, Style can periodically check in with a version server over the Internet and determine whether a new version of itself is available. You can choose to be informed about new final versions only, or also about new beta (pre-release) versions. No personal information (name, e-mail address, etc.) is sent to the server, and you can enable and disable version checking at any time in the Preferences dialog box.
Technically, the protocol used for version checking is SIVC over HTTP. SIVC (pronounced "civic") stands for Simple Internet Version Control and was designed by Chris W. Johnson.
|Copyright © 1998-2002 Merzwaren|