Skip to content

Commit

Permalink
Added a bit of documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendelplanque committed May 15, 2019
1 parent 44c386d commit 5af7c76
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PolyMathOrg/DataFrame/master/LICENSE)
[![Pharo version](https://img.shields.io/badge/Pharo-8.0-%23aac9ff.svg)](https://pharo.org/download)

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

```
Expand All @@ -11,3 +17,13 @@ Metacello new
baseline: 'Commander2';
load
```

## Example
`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.

0 comments on commit 5af7c76

Please sign in to comment.