Tools ClassBrowser/en

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen

Overview[Bearbeiten]

The Class Browser provides full access to the underlying class library and development framework. Both existing code can be browsed (to find and understand code API functions), changed and and new classes can be added with this tool while expecco is running (i.e. "while-running-surgery" or "hot code swap").

The tool's documentation is part of the official Smalltalk/X Online Documentation.

This is an expert tool, useful to coders only.

Notice, that you should have checked the "Install Source Code" toggle in the initial installation; otherwise, the browser will only be able to show the class's protocol, but not the actual source code. If you did not, please repeat the installation process, checking ONLY the "Install Source Code" toggle.

Most Interesting Classes[Bearbeiten]

You should use the browser to find additional useful operations, for which no elementary blocks are found in the expecco standard library. Be aware, that there are more than 50000 more-or-less useful functions to be found and used in elementary action blocks, so take your time to investigate the system and don't get overwhelmed by the sheer number of functions.

A few tricks help to find things quickly:

  • install the sources (without, no comments and of course, no source code is shown). The source code is very well documented, and without it, things are much harder to find. By default, the install dialog has this option enabled; unless you explicitly uncheck to toggle in the installation dialog, the sources should be available.
  • all classes are classified into groups. For example, all collection classes will be found under the "Collections-*" category, numbers under "Magitude-Numbers", etc. The top-left pane of the browser shows the categories. Look there first.
  • if you know the name of the class (or part of it), use the "Find Class..." menu function in the category list. Use wildcards, if you only know part of the name (or guessed it). For example, "*Array*", "*Stream*" or "*File*".
  • if you know the name of the operation, similar search options exist. Use the "Find Implementors..." function in the top-right pane. For example, to find all operations which have something to do with hexadecimal encodings, try implementors of "*hex*".
  • many classes provide in-code documentation. Switch to the class side (toggle the "Class/Instance" button and look for methods named "documentation" and "examples".
  • you can find calls to a function via the "Senders of..." menu function in the top-right pane. This shows you where and especially how a particular function is used by others in the system. As a example, look for senders of "readFrom:*" to find string-to-number converters.

Classes You Should Know About[Bearbeiten]

  • Collections: Collection (abstract), SequenceableCollection (abstract), Array, ByteArray, CharacterArray, String, Set and Dictionary
  • Streams: ReadStream, WriteStream, ExternalStream, PipeStream, Socket
  • Files & Directories: look at Filename and subclasses
  • Numeric: Number Float, Integer, Fraction
  • OperatingSystem: UnixOperatingSystem/WindowsOperatingSystem, -Registry, SocketAddress

Interactive (Hot Code Swap)[Bearbeiten]

Notice that any change made to the system will be immediately effective. It is even possible to change code in the browser while the code is executing (however, the currently running function will complete its execution and new code will be called with the next invokation)

See Also[Bearbeiten]

Smalltalk/X Online Documentation
Smalltalk/X Syntax Cheat Sheet
Smalltalk/X Class Documentation / Online Reference Manual

Back to Online Documentation.



Copyright © 2014-2024 eXept Software AG