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

Unified Diff: client/samples/total/src/Total.dart

Issue 8292003: Total now reads mortgage sample from server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Process stdout and stderr renames Created 9 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/samples/total/src/SYLKReader.dart ('k') | samples/total/src/Dartc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/samples/total/src/Total.dart
diff --git a/client/samples/total/src/Total.dart b/client/samples/total/src/Total.dart
index 66062a7583646d8207bc6e61b94b1586c0ec872a..ea962ab1eb170b1f4f2faaf28f0e05c38fe73d02 100644
--- a/client/samples/total/src/Total.dart
+++ b/client/samples/total/src/Total.dart
@@ -23,13 +23,15 @@ class Total {
void run() {
_spreadsheet = new Spreadsheet();
- Reader reader = new SYLKReader();
- List<String> data = reader.makeExample("mortgage");
- reader.loadSpreadsheet(_spreadsheet, data);
- _presenter = new SpreadsheetPresenter(_spreadsheet, window,
- 0, 0, DEFAULT_VISIBLE_ROWS, DEFAULT_VISIBLE_COLUMNS);
- _spreadsheet.setListener(_presenter);
- _presenter.recalculateViewport();
+ SYLKReader reader = new SYLKReader();
+ reader.request("mortgage", (String data) {
+ List<String> sylk = data.split('\n');
+ reader.loadSpreadsheet(_spreadsheet, sylk);
+ _presenter = new SpreadsheetPresenter(_spreadsheet, window,
+ 0, 0, DEFAULT_VISIBLE_ROWS, DEFAULT_VISIBLE_COLUMNS);
+ _spreadsheet.setListener(_presenter);
+ _presenter.recalculateViewport();
+ });
}
}
« no previous file with comments | « client/samples/total/src/SYLKReader.dart ('k') | samples/total/src/Dartc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698