Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Side by Side Diff: samples/actors/core/actors-term.dart

Issue 8969032: updated readme (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated README Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/actors/README ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #library('actors'); 1 #library('actors');
2 #source('actors.dart'); 2 #source('actors.dart');
3 #source('actors-interface.dart'); 3 #source('actors-interface.dart');
4 #source('actors-ui.dart'); 4 #source('actors-ui.dart');
5 5
6 class _WindowActor extends Actor { 6 class _WindowActor extends Actor {
7 _WindowActor() : super() { 7 _WindowActor() : super() {
8 on["print"] = (String m) { 8 on["print"] = (String m) {
9 print("${m}"); 9 print("${m}");
10 }; 10 };
11
12 /**
13 * Sends a message back using the 'reply' parameter after specified number
14 * of milliseconds specified by 'timeout' parameter.
15 */
16 on["setTimeout"] = (Reply reply, int timeout) {
17 new Timer((Timer t) {reply.respond();}, timeout, false);
18 };
11 } 19 }
12 } 20 }
13 21
14 class _WindowProxyImpl extends _NullWindowProxy { 22 class _WindowProxyImpl extends _NullWindowProxy {
15 ActorId _window; 23 ActorId _window;
16 _WindowProxyImpl(this._window); 24 _WindowProxyImpl(this._window);
17 25
18 void print(String m) => _window.send("print", [m]); 26 void print(String m) => _window.send("print", [m]);
27
28 void setTimeout(Reply t, int timeout) =>
29 _window.send("setTimeout", [t, timeout]);
19 } 30 }
OLDNEW
« no previous file with comments | « samples/actors/README ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698