wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

HSlider : Error #1009 #315

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install flashbuilder 4.0.0
2. Follow directions to have Flex Lib
3. Have an empty application with only an HSlider

What is the expected output? What do you see instead?
I should be seeing an hslider.

Instead, I'm getting an error:
TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at flexlib.baseClasses::SliderBase/getComponentBounds()[/Users/groumly/Development/workspace-3.5-flex4/FlexLib/src/flexlib/baseClasses/SliderBase.as:1845]
    at flexlib.baseClasses::SliderBase/measure()[/Users/groumly/Development/workspace-3.5-flex4/FlexLib/src/flexlib/baseClasses/SliderBase.as:1505]
    at mx.core::UIComponent/measureSizes()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8042]
    at mx.core::UIComponent/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7966]
    at mx.managers::LayoutManager/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:617]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:709]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

What version of the product are you using? On what operating system?
I have flash 4.0.0.  I'm using FlexLib 2.5 for Flex4 (though the flex 3 one 
provided the same problem.

Please provide any additional information below.
This seems to only be a problem for HSlider... TreeGrid came up fine.

Original issue reported on code.google.com by joshuajr...@gmail.com on 28 Jun 2010 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to mention I'm using Windows 7.

Original comment by joshuajr...@gmail.com on 28 Jun 2010 at 4:23

GoogleCodeExporter commented 9 years ago
I have it working in Flex Builder 3.  Flash Builder 4 on Windows 7 and XP 
doesn't work.

Original comment by joshuajr...@gmail.com on 29 Jun 2010 at 3:33

GoogleCodeExporter commented 9 years ago
I have the same problem here using Flash Builder 4 on XP. Tried to compile with 
the flexlib Flex 3 lib, but got the same error.

Original comment by Stefan.S...@gmail.com on 5 Aug 2010 at 1:34

GoogleCodeExporter commented 9 years ago
You have to assign a track skin to get around this problem. 

<ns:HSlider  id="slider"

                    trackSkin="mx.skins.spark.SliderThumbSkin"

...

Original comment by james.al...@gmail.com on 24 Aug 2010 at 5:05

GoogleCodeExporter commented 9 years ago
It doesn't seem to work for me setting the trackSkin as a mxml attribute.
I achieved to make this component work (with Flex sdk 4.1) setting the 
trackSkin and thumbSkin values in css :
#MySlider {
    trackSkin: ClassReference("mx.skins.spark.SliderTrackSkin");
    thumbSkin: ClassReference("mx.skins.spark.SliderThumbSkin");
}

Original comment by eric.hel...@fittingbox.com on 19 Oct 2010 at 3:41

GoogleCodeExporter commented 9 years ago
Great, this post helped! Only thing is that I also had to add 
trackHighlightSkin to my css to get it to work

flexlib|HSlider
{   
    trackSkin: ClassReference("mx.skins.spark.SliderTrackSkin");
    thumbSkin: ClassReference("mx.skins.spark.SliderThumbSkin");
    trackHighlightSkin: ClassReference("mx.skins.spark.SliderTrackHighlightSkin");
}

Original comment by herd...@gmail.com on 3 Nov 2010 at 11:04