Today I spent some time figuring out if and how I could change to default text font of the Smalltalk browsers in VisualWorks (76nc). For years I have been using my favorite coding font Dina (Win only) in any other tool such as Eclipse. Having this font also in VisualWorks would be very pleasing.
So I browsed through the source code of Look policies, Font policies and Font descriptions to find any clues. I was prepared to hack any method for this cause. Then I stumbled upon a little tool to assign Fonts to text styles:
Glare< is a Flex Remoting and Messaging server written in VisualWorks Smalltalk by Philipp Bunge. I am extending his work with Glare-DataServices which basically provides a HttpServlet that dispatches operation invocations send from a AMF client (Flex,AIR) to Smalltalk objects.
To work with Glare-DataServices, you need Smalltalk classes that implement operations and ActionScript classes that have corresponding methods in which these operations are invoked remotely. Because both classes (client and server-side) must have the same signature, it is clear that code generation can be very helpful.
Method categorization is an important part of documenting the interface of classes, which is quite unique to Smalltalk to my knowledge. Therefore most developers spent time reorganization their methods in commonly known categories such as initialize-release, accessing and instance creation.
PhilemonToolMethodCategories is a goodie that contains some extensions to the standard browsers that deal with categorization. In particular, it offers a different “Move to category…” menu item that pops up a menu with existing categories and another submenu with suggested category names. You can change the default list on a per-user basis like this:
The Classes Interface Browser is a small search tool to quickly find a Smalltalk class or one of its methods. The two inputs fields on top provide filters for class names and method names of that class. From a selected class or method, you can open a Class Browser by double-clicking. Using the list popup menus, you can navigate (superclass, subclasses…) in the class hierarchy, add a breakpoint and navigate (redefined, overridden) in the method implementation hierarchy.
VAStGoodies.com is the open source software repository for the VA Smalltalk community which was launched early this year by Adriaan van Os. As of today, the vastgoodies site has been extended with a page showing the activity statistics. Main purpose of this page is to let the community see that contributions are indeed downloaded and to give credits to those that maintain them.
Similar information has been available on Squeaksource for some time now and I was surprised to experience the effects on me with this kind of monitoring. When working on the Cloudfork packages for Squeak, the downloads statistics gives us immediately feedback about whether developers are interested. And a few times it felt like a contest to see whether I or the project could be the top committer for a while :-)
This goodie is also known as the “Diving” inspector as it allows you to navigate through an object structure by following each variable on a double-click. The inspection depth is shown in the inspector just above the “self”. You climb up the structure by clicking on that list item.
- missing image of /2009/03/navigating_inspector.png
Once loaded into your image, it takes over the standard inspector but uses any dedicated inspector as its model (e.g. EtDictionaryInspector). To see that working, try inspecting “Array with: Smalltalk”.
FileBrowser is a new addition to the configuration map “Philemon Tools” , available at VAStGoodies.com, for VA Smalltalk. This little but powerful tool has the following features:
- navigate through your local filesystem showing the contents of files (including images)
- file selection based on pattern matching
- support for custom templates for editing (see templateGroups:)
- configurable contents font
- navigation history
- spawn external programs associated with the selected file (e.g. starts Notepad on Windows for .INI)
- missing image of /2009/03/filebrowser.png
This goodie requires you to load the applications from the configuration map “Compuware SplitterWidget”, also available at VAStGoodies.com
if your application does not yet actually use that client Class. In my application, the result of a remote invocation kept returning a dynamic Object instead of the intended ValueObject class “Slot” although I specified the mapping and the RemoteClass metadata:
weborb-config.xml
<classMapping>
<clientClass>com.cae.planning.models.Slot</clientClass>
<serverClass>Slot</serverClass>
<source>Slot</source>
</classMapping>
Slot.as
[Bindable]
[RemoteClass(alias="com.cae.planning.models.Slot")]
public class Slot { ... }
So merely including the “import com.cae.planning.models.Slot;” in my application does not instruct the compiler to actually include that Class and therefore knows about the class mapping. Obviously, this can only happen if you work on new client classes that you are not yet using anywhere in your application.
Every now and then I need a small piece of functionality that perfectly fits into a single, minimal-behavior thus single-purpose class. This time I am developping a Adobe Flex application that uses the RemoteObject facilities. Before invoking a method on a RemoteObject, you have to add two event handlers that will be called with a ResultEvent or a FaultEvent respectively. Typically in the “onResult(event:ResultEvent)” function, one takes the result of the event and calls another function or update a view.
The configuration map “Philemon Tools” , available at VAStGoodies.com, now contains an application that enhances the source code browser in VisualAge for Smalltalk. In short, it provides the following features:
- code completion
- paste buffer (hold shift while selecting menu item "paste" to select from previous copied source)
- repeat edit action (like VisualWorks "again")
- modifier+key combinations (see below)
| Control+t |
ifTrue:[ {selected source} ] |
| Control+g |
ifFalse:[ {selected source} ] |
| Control+Shift+( |
( {selected source} ) |
| Control+1 |
Browse hierachy or implementors |
| Control+2 |
Browse references or senders |
| Control+3 |
Show previous occurrence of selected text |
| Control+4 |
Show next occurrence of selected text |
| Control+5 |
Show containing Block |
| Control+p |
Cycle forward through suggestions of completing method|variable|class name |
| Control+Shift+p |
Cycle backward through suggestions of completing method|variable|class name |
| F2 |
Format + Save |
| F5 |
Save |
| F6 |
Revert |
| F7 |
Indent selected source |
| F8 |
Un-indent selected source |
The code completion part is written by Erik Stel. Current implementation does not allow for custom bindings ; you just have to change the class EmmKeyboardProcessor in the PhilemonToolsKeyboard application. Alternatively, drop me an email if you have suggestions.