tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/8179-should-view-be-inherited-from-spriteRobotlegs: Discussion 2013-12-23T09:26:32Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/300389352013-11-19T09:08:00Z2013-11-19T09:08:00ZShould view be inherited from Sprite?<div><blockquote>
<p>Can I aggregate Sprite and make my RL View or the truth is htat
RL Views should extend Sprite or MovieClip?</p>
</blockquote>
<p>Can you be more specific? How are you intending to use the
aggregated component?</p>
<p>If you want the framework to be aware of components landing on
the stage, the components have to be subclasses of a
DisplayObjectContainer(->InteractiveObject->DisplayObject). A
Sprite is a subclass of DisplayObjectContainer, as you well
know:)</p>
<p>Look at the ViewManager&Co. "The ViewManager listens for
views landing on the stage, and being removed from stage, and
informs interested parties, such as the mediatorMap, accordingly.
"</p>
<p>The mediatorMap is able to mediate non-view objects:</p>
<p><a href=
"https://github.com/robotlegs/robotlegs-framework/tree/master/src/robotlegs/bender/extensions/mediatorMap#mediating-objects-manually">
https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...</a></p>
<p>or if you use the viewProcessorMap:<br>
<a href=
"https://github.com/robotlegs/robotlegs-framework/tree/master/src/robotlegs/bender/extensions/viewProcessorMap#processing-objects-manually">
https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...</a></p></div>Ondina D.F.