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

TreeMap issue in Flash 4.6 #12

Open
sreekumar1267 opened this issue Mar 23, 2015 · 7 comments
Open

TreeMap issue in Flash 4.6 #12

sreekumar1267 opened this issue Mar 23, 2015 · 7 comments

Comments

@sreekumar1267
Copy link

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!!

@joshtynjala
Copy link
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
Copy link
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
Copy link
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
Copy link
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
Copy link
Owner

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

@sreekumar1267
Copy link
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
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants