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

Unified Diff: pkg/observe/lib/src/observable_box.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/compound_binding.dart ('k') | pkg/observe/lib/src/observable_list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/observable_box.dart
diff --git a/pkg/mdv_observe/lib/src/observable_box.dart b/pkg/observe/lib/src/observable_box.dart
similarity index 73%
rename from pkg/mdv_observe/lib/src/observable_box.dart
rename to pkg/observe/lib/src/observable_box.dart
index 484a900f9b7faf66589114b91ef3b84c6ea0f318..7cc8fac5f325409fef30f85ca0157e4944aaac11 100644
--- a/pkg/mdv_observe/lib/src/observable_box.dart
+++ b/pkg/observe/lib/src/observable_box.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;
// TODO(jmesserly): should the property name be configurable?
// That would be more convenient.
@@ -13,8 +13,6 @@ part of mdv_observe;
* [ObservableMixin]. The property name for changes is "value".
*/
class ObservableBox<T> extends ObservableBase {
- static const _VALUE = const Symbol('value');
-
T _value;
ObservableBox([T initialValue]) : _value = initialValue;
@@ -22,16 +20,8 @@ class ObservableBox<T> extends ObservableBase {
T get value => _value;
void set value(T newValue) {
- _value = notifyPropertyChange(_VALUE, _value, newValue);
+ _value = notifyPropertyChange(const Symbol('value'), _value, newValue);
}
String toString() => '#<$runtimeType value: $value>';
-
- getValueWorkaround(key) {
- if (key == _VALUE) return value;
- return null;
- }
- void setValueWorkaround(key, newValue) {
- if (key == _VALUE) value = newValue;
- }
}
« no previous file with comments | « pkg/observe/lib/src/compound_binding.dart ('k') | pkg/observe/lib/src/observable_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698