flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33978) AIR mobile + flex sdk 4.10 + text field setFocus runtime error
Date Thu, 26 Dec 2013 21:07:50 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857075#comment-13857075
] 

Justin Mclean commented on FLEX-33978:
--------------------------------------

Contrived example that gives RTE:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" initialize="init(event)">
	<fx:Script>
		<![CDATA[
			import mx.events.FlexEvent;
			
			import spark.components.supportClasses.StyleableTextField;
			
			protected function init(event:FlexEvent):void
			{
				ta.textDisplay = new StyleableTextField();
				ta.setFocus();
			}
			
		]]>
	</fx:Script>
	
	<s:TextArea id="ta" />
</s:Application>


> AIR mobile + flex sdk 4.10 + text field setFocus runtime error
> --------------------------------------------------------------
>
>                 Key: FLEX-33978
>                 URL: https://issues.apache.org/jira/browse/FLEX-33978
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.10.0
>            Reporter: Deyan Vitanov
>            Assignee: Justin Mclean
>              Labels: easyfix, easytest
>
> Inside setFocus method, this check throws Null pointer exception:
> if (stage.focus != this) 
> because stage is null.
> Here is the full stack trace:
> TypeError: Error #1009: Cannot access a property or method of a null object reference.
> 	at spark.components.supportClasses::StyleableTextField/setFocus()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as:1016]
> 	at Function/http://adobe.com/AS3/2006/builtin::apply()
> 	at mx.core::UIComponent/callLaterDispatcher2()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/core/UIComponent.as:12494]
> 	at mx.core::UIComponent/callLaterDispatcher()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/core/UIComponent.as:12432]



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message