Problem establishing ContextView (Robotlegs 2)
I'm trying to create my first Robotlegs and Starling Actionscript only AIR 11.8 app using Intellij IDEA, and I'm coming across an internal Robotlegs error when trying to configure a new ContextView. I'm trying to "go by the book" as outlined in the source readme.md files.
The error is:
A ContextView must be installed if you install the ContextViewExtension.
It is triggered by the .configure( new ContextView(this) ) statement.
I'm puzzled! This is my first time using Robotlegs. Be kind, and thanks!
Eagerly awaiting the Robotlegs 2 docs,
Steve
----------------------
Full trace:
115 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object VigilanceExtension]
116 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object InjectableLoggerExtension]
116 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ContextViewExtension]
117 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object EventDispatcherExtension]
117 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ModularityExtension]
118 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object DirectCommandMapExtension]
118 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object EventCommandMapExtension]
118 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object LocalEventMapExtension]
119 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ViewManagerExtension]
120 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageObserverExtension]
120 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object MediatorMapExtension]
120 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ViewProcessorMapExtension]
122 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageCrawlerExtension]
122 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageSyncExtension]
123 DEBUG Context-0-5e [object ConfigManager] Not yet initialized. Queuing config class [class ContextViewListenerConfig]
123 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StarlingBundle]
124 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ContextViewExtension]
124 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ViewManagerExtension]
125 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageObserverExtension]
125 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object ManualStageObserverExtension]
125 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object MediatorMapExtension]
126 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageCrawlerExtension]
126 DEBUG Context-0-5e [object ExtensionInstaller] Installing extension [object StageSyncExtension]
126 DEBUG Context-0-5e [object ConfigManager] Not yet initialized. Queuing config class [class ContextViewListenerConfig]
127 DEBUG Context-0-5e [object ConfigManager] Not yet initialized. Queuing config object [object ContextView]
127 DEBUG Context-0-5e [object ContextViewExtension] Mapping [object RobotCouch] as contextView
128 DEBUG Context-0-5e [object ModularityExtension] Context has a ViewManager. Configuring view manager based context existence watcher...
139 DEBUG Context-0-5e [object ModularityExtension] Context configured to inherit. Broadcasting existence event...
140 DEBUG Context-0-5e [object StageSyncExtension] Context view is now on stage. Initializing context...
142 INFO Context-0-5e Context-0-5e Initializing...
148 ERROR Context-0-5e [object ContextViewExtension] A ContextView must be installed if you install the ContextViewExtension.
Error: A ContextView must be installed if you install the ContextViewExtension.
at robotlegs.bender.extensions.vigilance::VigilanceExtension/log()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/extensions/vigilance/VigilanceExtension.as:50]
at robotlegs.bender.framework.impl::LogManager/log()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/LogManager.as:89]
at robotlegs.bender.framework.impl::Logger/error()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Logger.as:78]
at robotlegs.starling.extensions.contextView::ContextViewExtension/beforeInitializing()[C:\Users\Alessandro\Skydrive\Workspace\Personal\robotlegs-extension-starling\src\robotlegs\starling\extensions\contextView\ContextViewExtension.as:35]
at MessageRunner/next()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:152]
at MessageRunner/run()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:135]
at robotlegs.bender.framework.impl::MessageDispatcher/dispatchMessage()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/MessageDispatcher.as:87]
at robotlegs.bender.framework.impl::LifecycleTransition/enter()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/LifecycleTransition.as:191]
at robotlegs.bender.framework.impl::Lifecycle/initialize()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Lifecycle.as:149]
at robotlegs.bender.framework.impl::Context/initialize()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Context.as:159]
at robotlegs.bender.extensions.contextView::StageSyncExtension/initializeContext()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/extensions/contextView/StageSyncExtension.as:84]
at robotlegs.bender.extensions.contextView::StageSyncExtension/handleContextView()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/extensions/contextView/StageSyncExtension.as:66]
at ObjectHandler/handle()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/ObjectProcessor.as:89]
at robotlegs.bender.framework.impl::ObjectProcessor/processObject()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/ObjectProcessor.as:48]
at robotlegs.bender.framework.impl::ConfigManager/addConfig()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/ConfigManager.as:78]
at robotlegs.bender.framework.impl::Context/configure()[/Development/Projects/Robotlegs/robotlegs-framework/src/robotlegs/bender/framework/impl/Context.as:313]
at RobotCouch()[/Users/steve/Documents/projects/Robotcouch/project/src/RobotCouch.as:45]
The full error
----------------------
// Here's the source code. Please ignore some of the import messiness.
package {
import com.fatredcouch.robotcouch.view.AppView;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import robotlegs.bender.bundles.mvcs.MVCSBundle;
import robotlegs.bender.extensions.contextView.ContextView;
import robotlegs.bender.framework.api.IContext;
import robotlegs.starling.extensions.contextView.ContextViewExtension;
import robotlegs.bender.framework.impl.Context;
import robotlegs.starling.bundles.mvcs.StarlingBundle;
public class RobotCouch extends Sprite
{
protected var _context:IContext;
public function RobotCouch()
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
_context = new Context()
.install( MVCSBundle, StarlingBundle )
.configure( new ContextView(this as DisplayObjectContainer) );
}
}
}
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on Jul 25, 2013 @ 07:48 AM
Hello Stephen,
Which Starling extension are you using and which version of robotlegs 2?
Are you getting the same error in a non Starling project?
What is the StarlingBundle? What does it do?
Where is your Starling configuration?
There are a couple of Starling examples/extensions written by users out there. We can't guarantee that they'd work with the latest version of robotlegs 2, but you can have a look at them to learn how to create a context with starling.
In case you didn't know about them:
https://github.com/Vj3k0/robotlegs-bender-example-SARS-integration
https://github.com/brean/robotlegs2-starling-clock-example
https://github.com/jamieowen/robotlegs2-starling-viewmap
https://github.com/lidev/robotlegs2-signals-feathers-flickr-example/
Also see this discussion:
http://knowledge.robotlegs.org/discussions/robotlegs-2/4067-context...
Let us know how it goes. I'd take a look at your code, if you attached your project or an example that reproduces your issue.
hth
Ondina
2 Posted by armoredblimp on Jul 25, 2013 @ 06:42 PM
Thanks for the quick reply Ondina. The message threw me off and I didn't think it was Starling related, but removing the Starling bundle install is resolving the issue.
I'm continuing the hammer on this working with Starling, and I'll post an update soon.
Thank you for the excellent links!
Support Staff 3 Posted by Ondina D.F. on Jul 26, 2013 @ 09:50 AM
Hey Steve,
Glad you're back on track. I'm going to close this discussion, but you can re-open it whenever you want, or open new discussions for new issues.
Cheers,
Ondina
Ondina D.F. closed this discussion on Jul 26, 2013 @ 09:50 AM.