Skip to content

Commit

Permalink
README.md edited online with Bitbucket
Browse files Browse the repository at this point in the history
  • Loading branch information
sglienke committed Jun 26, 2015
1 parent 2c1e2b0 commit eb96213
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# KnockOff #
# Knockoff #

A simple prototype inspired by [Knockout.js](http://knockoutjs.com) to show how MVVM in Delphi can work.
A simple prototype inspired by [Knockout.js](http://knockoutjs.com) to show how MVVM in Delphi can work.

### Observable ###

Core of the library is the Observable<T> type which is an anonymous method type which is overloaded. So it combines being getter and setter in one type. Following code example shows how to get and set the value of an observable.


```
#!delphi
var
o: Observable<Integer>;
i: Integer;
begin
o := Observable.Create(42);
i := o(); // calls the function: T overload
o(i + 1); // calls the procedure(const value: T) overload
```

0 comments on commit eb96213

Please sign in to comment.