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

Unified Diff: sky/sdk/lib/rendering/README.md

Issue 1208293002: Rename setParentData to setupParentData since it's not a setter per se. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/examples/rendering/sector_layout.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/README.md
diff --git a/sky/sdk/lib/rendering/README.md b/sky/sdk/lib/rendering/README.md
index 3570d0ac9b6246450191cf44d935d2015e671682..bf707f248a744a1ba694219c2ca9dc2b0929f8d8 100644
--- a/sky/sdk/lib/rendering/README.md
+++ b/sky/sdk/lib/rendering/README.md
@@ -79,11 +79,11 @@ models and are free to invent novel child models for their specific use cases.
TODO(ianh): Describe the parent data concept.
-The `setParentData()` method is automatically called for each child
+The `setupParentData()` method is automatically called for each child
when the child's parent is changed. However, if you need to
preinitialise the `parentData` member to set its values before you add
a node to its parent, you can preemptively call that future parent's
-`setParentData()` method with the future child as the argument.
+`setupParentData()` method with the future child as the argument.
### Box Model
@@ -154,7 +154,7 @@ A subclass of `RenderObject` must fulfill the following contract:
* Information about the child managed by the parent, e.g. typically
position information and configuration for the parent's layout,
should be stored on the `parentData` member; to this effect, a
- ParentData subclass should be defined and the `setParentData()`
+ ParentData subclass should be defined and the `setupParentData()`
method should be overriden to initialise the child's parent data
appropriately.
@@ -208,18 +208,18 @@ A `RenderBox` subclass is required to implement the following contract:
you fulfill their contract instead.
* If it has any data to store on its children, it must define a
- BoxParentData subclass and override setParentData() to initialise
+ BoxParentData subclass and override setupParentData() to initialise
the child's parent data appropriately, as in the following example.
(If the subclass has an opinion about what type its children must
be, e.g. the way that `RenderBlock` wants its children to be
- `RenderBox` nodes, then change the `setParentData()` signature
+ `RenderBox` nodes, then change the `setupParentData()` signature
accordingly, to catch misuse of the method.)
```dart
class FooParentData extends BoxParentData { ... }
// In RenderFoo
- void setParentData(RenderObject child) {
+ void setupParentData(RenderObject child) {
if (child.parentData is! FooParentData)
child.parentData = new FooParentData();
}
« no previous file with comments | « sky/examples/rendering/sector_layout.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698