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

Unified Diff: pkg/observe/lib/src/observable_list.dart

Issue 17552019: Reorganize mdv and observe packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 7 years, 6 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 | « pkg/observe/lib/src/observable_box.dart ('k') | pkg/observe/lib/src/observable_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/observable_list.dart
diff --git a/pkg/mdv_observe/lib/src/observable_list.dart b/pkg/observe/lib/src/observable_list.dart
similarity index 96%
rename from pkg/mdv_observe/lib/src/observable_list.dart
rename to pkg/observe/lib/src/observable_list.dart
index 66ca771151631711ab8acb5c043a505c5833856d..bc66ea02f3f529aec48e2c4aa46819d43f061118 100644
--- a/pkg/mdv_observe/lib/src/observable_list.dart
+++ b/pkg/observe/lib/src/observable_list.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-part of mdv_observe;
+part of observe;
/**
* Represents an observable list of model values. If any items are added,
@@ -14,8 +14,6 @@ class ObservableList<E> extends _ListBaseWorkaround with ObservableMixin
implements List<E> {
List<ListChangeRecord> _records;
- static const _LENGTH = const Symbol('length');
-
/** The inner [List<E>] with the actual storage. */
final List<E> _list;
@@ -38,13 +36,6 @@ class ObservableList<E> extends _ListBaseWorkaround with ObservableMixin
factory ObservableList.from(Iterable<E> other) =>
new ObservableList<E>()..addAll(other);
- // TODO(jmesserly): remove once we have mirrors
- getValueWorkaround(key) => key == _LENGTH ? length : null;
-
- setValueWorkaround(key, value) {
- if (key == _LENGTH) length = value;
- }
-
int get length => _list.length;
set length(int value) {
@@ -230,7 +221,7 @@ class ObservableList<E> extends _ListBaseWorkaround with ObservableMixin
}
if (length != oldLength) {
- notifyPropertyChange(_LENGTH, oldLength, length);
+ notifyPropertyChange(const Symbol('length'), oldLength, length);
}
if (_records.length == 1) {
« no previous file with comments | « pkg/observe/lib/src/observable_box.dart ('k') | pkg/observe/lib/src/observable_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698