You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Jagan Langa Sami Durai <ja...@sybrant.com> on 2013/05/30 12:42:51 UTC
[Bug] minor bug in SkinnableComponent
override public function drawFocus(isFocused:Boolean):void
{
if (isFocused)
{
// For some composite components, the focused object may not
// be "this". If so, we don't want to draw the focus.
/*
*when the component is not added to the stage, focusManager is null for
that component. so following condition has to be replace as this *
*if (!drawFocusAnyway && focusManager && focusManager.getFocus() != this)*
*/
if (!drawFocusAnyway && focusManager.getFocus() != this)
return;
if (!focusObj)
{
var focusSkinClass:Class = getStyle("focusSkin");
if (focusSkinClass)
focusObj = new focusSkinClass();
if (focusObj)
super.addChildAt(focusObj, 0);
}
if (focusObj && "target" in focusObj)
focusObj["target"] = this;
}
else
{
if (focusObj)
super.removeChild(focusObj);
focusObj = null;
}
}
--
*
Regards,
S. Jagan Langa*
Re: [Bug] minor bug in SkinnableComponent
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Fix checked into the Apache Flex SDK develop branch - it will be fixed in Apache Flex 4.10.
Justin
Re: [Bug] minor bug in SkinnableComponent
Posted by Jagan Langa Sami Durai <ja...@sybrant.com>.
Hi,
Actually, this will not happen in normal case. I accidentally found this
case.
Here is the steps to reproduce,
I added a component in a container (container is a skinPart of a custom
popup).
that container will not be added to the stage until the popup is changed to
some view state.
at this stage, I mistakenly tried to draw focus programatically to that
component. at this time focusManager of component is null and throwing the
null object error.
On Thu, May 30, 2013 at 4:44 PM, Justin Mclean <ju...@classsoftware.com>wrote:
> Hi,
>
> Also would it be possible to provide a sample application that shows this
> issue.
>
> Thanks,
> Justin
--
*
Regards,
S. Jagan Langa* *|* *Team Lead*
*Sybrant Technologies Pvt Ltd*
*--------------------------------
*
‘Shriram The Gateway (SEZ)’, Block A1,
3rd Floor, 16 GST Road, Perungalathur,
Chennai - 600 063, India
India | USA | Germany | China
Mobile: +91 98430 50897
Skype: seesamjagan
Re: [Bug] minor bug in SkinnableComponent
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Also would it be possible to provide a sample application that shows this issue.
Thanks,
Justin
Re: [Bug] minor bug in SkinnableComponent
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Probably a better fix would be to change:
if (isFocused)
To:
if (isFocused && focusManager)
I'll test that out and check it in for you.
Do you know if there any existing JIRA issue describing this issue?
Thanks,
Justin