Null object reference when instantiating ContextViewListenerConfig upon Configuring ContextView
I'm trying to set up a very simple RL2 application. I have extensively sought out the example pages and 3rd-party application examples and have followed them to the T, yet I continue to get:
34 INFO Context-0-16 Context-0-16 Initializing... 41 DEBUG
Context-0-16 [object StageObserverExtension] Creating genuine
StageObserver Singleton 42 DEBUG Context-0-16 [object
ConfigManager] Now initializing. Instantiating config class [class
ContextViewListenerConfig] TypeError: Error #1009: Cannot access a
property or method of a null object reference. at
robotlegs.bender.extensions.contextView::ContextViewListenerConfig/configure()
at robotlegs.bender.framework.impl::ConfigManager/processClass() at
robotlegs.bender.framework.impl::ConfigManager/processQueue() at
robotlegs.bender.framework.impl::ConfigManager/initialize() at
flash.events::EventDispatcher/dispatchEventFunction() at
flash.events::EventDispatcher/dispatchEvent() at
robotlegs.bender.framework.impl::Lifecycle/dispatchEvent() at
robotlegs.bender.framework.impl::LifecycleTransition/dispatch() at
MethodInfo-199() at
global/robotlegs.bender.framework.impl::safelyCallBack() at
MessageRunner/next() at MessageRunner/run() at
robotlegs.bender.framework.impl::MessageDispatcher/dispatchMessage()
at robotlegs.bender.framework.impl::LifecycleTransition/enter() at
robotlegs.bender.framework.impl::Lifecycle/initialize() at
robotlegs.bender.framework.impl::Context/initialize() at
robotlegs.bender.extensions.contextView::StageSyncExtension/initializeContext()
at
robotlegs.bender.extensions.contextView::StageSyncExtension/handleContextView()
at ObjectHandler/handle() at
robotlegs.bender.framework.impl::ObjectProcessor/processObject() at
robotlegs.bender.framework.impl::ConfigManager/addConfig() at
robotlegs.bender.framework.impl::Context/configure() at
MyGame/initContext() at MyGame() 43 INFO Context-0-16 Context-0-16
Initialize complete STARTUP 43 DEBUG Context-0-16 [object
StageCrawlerExtension] ViewManager is installed. Checking for
managed containers...
MyGame.as (Document Class)
` package {
import robotlegs.bender.bundles.mvcs.MVCSBundle;
import robotlegs.bender.extensions.signalCommandMap.SignalCommandMapExtension;
import com.andrewwalpole.towerwars.config.GameConfig;
import robotlegs.bender.extensions.contextView.ContextView;
import flash.display.Sprite;
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.impl.Context;
public class MyGame extends Sprite {
private var _context:IContext;
public function MyGame() {
super();
initContext();
}
private function initContext():void {
_context = new Context();
_context.afterInitializing( startup );
_context.install(MVCSBundle, SignalCommandMapExtension );
_context.configure(GameConfig);
_context.configure(new ContextView( this ));
}
private function startup():void
{
trace("STARTUP");
}
}
} `
You can see I'm trying to use SignalCommandMapExtension, but even when removing it this continues to happen, same with turning GameConfig.as into an empty shell. Any insight would be appreciated.
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 Shaun Smith on 15 Jul, 2013 10:00 PM
Hi. Are you compiling with the Flash IDE? Are you building using the RL2 source, or the SWC?
2 Posted by walpolea on 15 Jul, 2013 10:02 PM
I'm using the Flash Pro IDE. The fla is linked up with the SWC. Same result across Flash Pro CS5.5, CS6 and CC.
3 Posted by walpolea on 15 Jul, 2013 10:05 PM
Thanks!! ... your prodding question led me to the right answer. I just didn't have the right info to search for:
http://knowledge.robotlegs.org/discussions/questions/1254-robotlegs...
Publish Settings > Check Publish SWC
Support Staff 4 Posted by Shaun Smith on 15 Jul, 2013 10:08 PM
Excellent! Also, this led to an idea that should help in the future... so, thank you :)
walpolea closed this discussion on 16 Jul, 2013 03:22 PM.