Skip to content
Flexible implementation of the command design pattern.
Smalltalk HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.project
.properties
.smalltalk.ston
.travis.yml
README.md

README.md

Commander 2

Build Status License Pharo version

Implementation of the command design pattern with the following objectives:

  • Simple model of commands
  • Ease reusability of commands accross multiple tools / framework
  • Instance of commands can be modified (e.g., name, description, etc...)
  • Pluging custom user-command made easy

Install

Metacello new
	repository: 'github://pharo-spec/Commander2/src';
	baseline: 'Commander2';
	load

Example

Note: This example is now shipped with the Spec2 integration which is managed by Spec2 project. The code is thus no longer available in this repository.

Commander2-ContactBook package contains an example of Commander2 usage in the context of a Spec application.

The following code should be checked when learning how to use the framework:

  • CmContactBookCommand and subclasses are the definition of commands required by the example application.
  • CmContactBookPresenter class>>#buildCommandsGroupWith:forRoot: This method is the entry point to describe commands available to your Spec presenter. One can learn how to build group of commands from this method.
  • CmContactBookPresenter>>#initializeWidgets This method shows how to inject a Spec's MenuPresenter built from a command group in your presenter.
  • CmContactBookPresenter>>#initializeWindow: This method shows how to bind the shortcuts defined by your command group to your Spec presenter.
You can’t perform that action at this time.