Overlays: Difference between revisions
imported>Dramforever Add section on data flow with illustration |
imported>Dramforever m Reword the description of the overlay graph |
||
Line 19: | Line 19: | ||
[[File:Dram-overlay-self-super.png]] | [[File:Dram-overlay-self-super.png]] | ||
Here the main package set is extended with two overlays, ext-1 and ext-2. <tt> | Here the main package set is extended with two overlays, ext-1 and ext-2. <tt>x // y</tt> is represented by a <tt>//</tt> box with <tt>x</tt> coming in from the left and <tt>y</tt> from above. | ||
As you can see, <tt>self</tt> is the same for every stage, but <tt>super</tt> comes from only the stage before. So when you define an attribute <tt>foo</tt> in the set to override it, within that overlay <tt>self.foo</tt> will be it's version, and <tt>super.foo</tt> will be the non-overriden version. This is why you see patterns like <tt>foo = super.foo.override { ... }</tt>. | As you can see, <tt>self</tt> is the same for every stage, but <tt>super</tt> comes from only the stage before. So when you define an attribute <tt>foo</tt> in the set to override it, within that overlay <tt>self.foo</tt> will be it's version, and <tt>super.foo</tt> will be the non-overriden version. This is why you see patterns like <tt>foo = super.foo.override { ... }</tt>. |