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

Side by Side Diff: pkg/observe/lib/src/compound_binding.dart

Issue 20907003: [mdv] fix checked mode issue (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of observe; 5 part of observe;
6 6
7 /** The callback used in the [CompoundBinding.combinator] field. */ 7 /** The callback used in the [CompoundBinding.combinator] field. */
8 typedef Object CompoundBindingCombinator(Map objects); 8 typedef Object CompoundBindingCombinator(Map objects);
9 9
10 /** 10 /**
(...skipping 25 matching lines...) Expand all
36 Map _values = new Map(); 36 Map _values = new Map();
37 Object _value; 37 Object _value;
38 38
39 /** 39 /**
40 * True if [resolve] is scheduled. You can set this to true if you plan to 40 * True if [resolve] is scheduled. You can set this to true if you plan to
41 * call [resolve] manually, avoiding the need for scheduling an asynchronous 41 * call [resolve] manually, avoiding the need for scheduling an asynchronous
42 * resolve. 42 * resolve.
43 */ 43 */
44 // TODO(jmesserly): I don't like having this public, is the optimization 44 // TODO(jmesserly): I don't like having this public, is the optimization
45 // really needed? "runAsync" in Dart should be pretty cheap. 45 // really needed? "runAsync" in Dart should be pretty cheap.
46 bool scheduled; 46 bool scheduled = false;
47 47
48 /** 48 /**
49 * Creates a new CompoundBinding, optionally proving the [combinator] function 49 * Creates a new CompoundBinding, optionally proving the [combinator] function
50 * for computing the value. You can also set [schedule] to true if you plan 50 * for computing the value. You can also set [schedule] to true if you plan
51 * to invoke [resolve] manually after initial construction of the binding. 51 * to invoke [resolve] manually after initial construction of the binding.
52 */ 52 */
53 CompoundBinding([CompoundBindingCombinator combinator]) { 53 CompoundBinding([CompoundBindingCombinator combinator]) {
54 // TODO(jmesserly): this is a tweak to the original code, it seemed to me 54 // TODO(jmesserly): this is a tweak to the original code, it seemed to me
55 // that passing the combinator to the constructor should be equivalent to 55 // that passing the combinator to the constructor should be equivalent to
56 // setting it via the property. 56 // setting it via the property.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 for (var binding in _observers.values) { 126 for (var binding in _observers.values) {
127 binding.cancel(); 127 binding.cancel();
128 } 128 }
129 _observers.clear(); 129 _observers.clear();
130 _values.clear(); 130 _values.clear();
131 value = null; 131 value = null;
132 } 132 }
133 133
134 _unobserved() => close(); 134 _unobserved() => close();
135 } 135 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698