VisualWorks - String and Files

String and Files

Cincom's first tutorial on VisualWorks illustrates how VisualWorks can be used to manipulate server log files. It illustrates how things like strings and files can be easily subsumed into the object structure within VisualWorks. Consider the Smalltalk expression:

'ws000101.log' asFilename edit

One can evaluate this expression as-is in a VisualWorks workspace using one command in the operate menu. This creates:

  1. An object of class ByteString containing the string (as bytes) and the methods for manipulating it;
  2. An object of class NTFSFilename (in Windows XP); and
  3. An editor object.

The latter is a simple notebook-like editor containing the contents of the file. That is, the evaluation created a filename object as a gateway to the file ws000101.log and opened an editor onto it. The editor itself is an object, as are all its components (down to and including the characters in its menus). The source code is available for all these objects, and VisualWorks has a plethora of inspectors, browsers, and other tools for anyone to evaluate and inspect the code in static or dynamic mode.

Read more about this topic:  VisualWorks

Famous quotes containing the words string and/or files:

    A culture may be conceived as a network of beliefs and purposes in which any string in the net pulls and is pulled by the others, thus perpetually changing the configuration of the whole. If the cultural element called morals takes on a new shape, we must ask what other strings have pulled it out of line. It cannot be one solitary string, nor even the strings nearby, for the network is three-dimensional at least.
    Jacques Barzun (b. 1907)

    But some who this blithe mood present,
    As on in lightsome files they fare,
    Shall die experienced ere three days be spent—
    Perish, enlightened by the vollied glare;
    Or shame survive, and, like to adamant,
    Thy after shock, Manassas, share.
    Herman Melville (1819–1891)