Commit 09538aed authored by Adam Barth's avatar Adam Barth

stocks and stocks-fn should share the stocks data

Previously, the two versions of this sample app had separate copies of the
stock data. This CL moves the common data to the common data directory so that
they can share. Also, I've switched the data files to be |dart| files rather
than |sky| files to make them easier to use from fn examples.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/980953002
parent 7b1f56d8
<!--
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-->
<script>
final List<Map> kData = [
{"name":"New York","state":"New York","population":8363710},
{"name":"Los Angeles","state":"California","population":3833995},
......@@ -5005,4 +5003,3 @@ final List<Map> kData = [
{"name":"Hartwell","state":"Georgia","population":4298},
{"name":"Newport","state":"North Carolina","population":4298}
];
</script>
<script>
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "dart:math";
// Snapshot from http://www.nasdaq.com/screening/company-list.aspx
......@@ -3013,5 +3016,3 @@ class StockOracle {
}
final StockOracle oracle = new StockOracle.fromCompanyList(_kCompanyList);
</script>
......@@ -5,7 +5,6 @@
-->
<import src="/sky/framework/sky-element.sky" />
<import src="/sky/framework/sky-scrollable.sky" />
<import src="../data/cities.sky" as="cities" />
<sky-element>
<template>
......@@ -20,6 +19,7 @@
</template>
<script>
import "dart:sky";
import "../data/cities.dart" as cities;
@Tagname('scrolling')
class Scrolling extends SkyElement {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
library stocksapp;
import '../data/stocks.dart';
import '../fn/lib/fn.dart';
import '../fn/widgets/widgets.dart';
import 'dart:collection';
import 'dart:math';
import 'dart:sky' as sky;
part 'companylist.dart';
part 'stockarrow.dart';
part 'stocklist.dart';
part 'stockrow.dart';
......
......@@ -12,7 +12,6 @@
<import src="/sky/framework/sky-scrollable.sky" />
<import src="/sky/framework/sky-toolbar.sky" />
<import src="stock.sky" as='view'/>
<import src='companylist.sky' as='model'/>
<sky-element>
<template>
......@@ -71,6 +70,7 @@
<script>
import "dart:sky";
import "dart:math";
import "../data/stocks.dart" as model;
List pick(List list, int count) {
var rng = new Random();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment