Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

TreeMap issue in Flash 4.6 #12

@sreekumar1267

Description

@sreekumar1267

I had used the Treemap in Flash 3.2 code and it worked fine. Now we migrated the code to Flash 4.6 and after that we are getting the below error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.flextoolbox.controls.treeMapClasses::TreeMapLeafRenderer/updateBackgroundSkin()
at com.flextoolbox.controls.treeMapClasses::TreeMapLeafRenderer/createChildren()
at mx.core::UIComponent/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::UIComponent/addChild()
at com.flextoolbox.controls::TreeMap/getLeafRenderer()
at com.flextoolbox.controls::TreeMap/refreshBranchChildRenderers()
at com.flextoolbox.controls::TreeMap/refreshBranchChildRenderers()
at com.flextoolbox.controls::TreeMap/commitProperties()
at mx.core::UIComponent/validateProperties()

Any pointers would help!!

Activity

joshtynjala

joshtynjala commented on Mar 23, 2015

@joshtynjala
Owner

See the note in the readme about defaults.css. If I remember correctly, the version that was compatible with Flex 3 didn't need this file. However, for proper compatibility with Flex 4, it had to be added. If you aren't including this file when you compile, the TreeMap component won't have default styles. If you use the SWC file, defaults.css will be included automatically.

sreekumar1267

sreekumar1267 commented on Mar 24, 2015

@sreekumar1267
Author

Where exactly should i add the default.css file? I am using your code inside a library project which has this structure -- LibProjectMain --> com --> flextoolbox. Inside flextoolbox i have all the other folders.
Should i place the default.css inside com directory? Just creating a file alone is enough or do i need to load the css anywhere in your code? Please let me know

joshtynjala

joshtynjala commented on Mar 24, 2015

@joshtynjala
Owner

The build script uses the following command line arguments to include defaults.css in the SWC:

--include-stylesheet defaults.css source/defaults.css

defaults.css is in the same folder as the com folder. Your project may have a slightly different folder structure, so that exact set of arguments may not be the same for your project. For instance, if defaults.css and the com folder code were in a folder named src instead of source, you would change the command like this:

--include-stylesheet defaults.css src/defaults.css
sreekumar1267

sreekumar1267 commented on Mar 25, 2015

@sreekumar1267
Author

Thanks! I added the default.css file in the source path. But still i face the issue. What should be the contents inside the css file?

joshtynjala

joshtynjala commented on Mar 25, 2015

@joshtynjala
Owner

What do you mean? Use the existing file that comes with the project.

sreekumar1267

sreekumar1267 commented on Mar 25, 2015

@sreekumar1267
Author

I do not have any existing css files in that project. I have created a library project which has your code for TreeMap. I am including this library project in my main project.

joshtynjala

joshtynjala commented on Mar 25, 2015

@joshtynjala
Owner

The code for TreeMap comes with a defaults.css file. Use that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @joshtynjala@sreekumar1267

        Issue actions

          TreeMap issue in Flash 4.6 · Issue #12 · joshtynjala/flextreemap