Error #1009: Cannot access a property or method of a null object reference

Animatect's Avatar

Animatect

16 Sep, 2010 08:06 AM

Hi, I'm going crazy, I'm trying to compile a really simple hello world, (the one from Joel Hook's article on insideRia) but when I try to populate the textArea with the message from the custom event, I get the error: "Error #1009: Cannot access a property or method of a null object reference"

I allready added the swiftSuspenders and the robotlegs swc files to the build path, and eaven added this: "-keep-as3-metadata+=Inject -keep-as3-metadata+=PostConstruct" to the command line utility.

I really don't know what else to do, please help.

I'll attach my source folder if anyone wants to see it please feel free

Thank you in advance.

  1. Support Staff 1 Posted by Ondina D.F. on 16 Sep, 2010 08:49 AM

    Ondina D.F.'s Avatar

    Hi Animatect,

    you have a little typo inside your MessageViewMediator:
    the lower-case inject
    [inject] public var view:MessageView;

    it has to be [Inject]

    Ondina

  2. 2 Posted by Stray on 16 Sep, 2010 08:56 AM

    Stray's Avatar

    Hi there,

    could you paste the whole stack for the error?

    Also - could you paste the whole compile instruction.

    As in:

    mxmlc +configname=air -define=CONFIG::AutoTest,false -debug -default-background-color=#FFFFFF -default-size 800 600 -keep-as3-metadata+=Inject -library-path+=lib/airglobal.swc -library-path+=lib/airframework.swc -library-path+=lib/as3-signals.swc -output=bin/shell-debug.swf -source-path+=src -source-path+=assets -source-path+=lib/robotlegs -target-player=10.0.0 src/AcademyShell.as
    Loading configuration file /Users/lindseyf/Library/Sprouts/cache/0.7/sprout-flex4sdk-tool-4.1.60109/archive/frameworks/air-config.xml
    /Users/lindseyf/Documents/clients/project/bin/shell-debug.swf (1714015 bytes)

    Or whatever your output is.

    It seems likely that your metadata still isn't being kept.

    One thing I've run into with this before is that unless you change the actually source code, you don't always get a new build. So if you'd already tried to build, and then added the metadata, you might not get a new compile unless you change something in your source code (just add a blank line or a comment somewhere) or clean the existing build files.

    We'll get to the bottom of it with you - don't worry,

    Stray

  3. 3 Posted by Stray on 16 Sep, 2010 09:39 AM

    Stray's Avatar

    Well spotted!

  4. 4 Posted by Animatect on 16 Sep, 2010 04:49 PM

    Animatect's Avatar

    Wow Guyss thanks a lot, since it was still color coding the metadata tag I assumed it was a RobotLegs problem.

  5. Stray closed this discussion on 10 Feb, 2011 05:47 PM.

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