Solved

application has been deprecated since 4.0-use FlexGlobals.topLevelApplication

Posted on 2011-03-01
1
1,024 Views
Last Modified: 2012-08-14
Finished cleaning up 14 errors but this last one is killing me.  

Is it referring to changing <mx:Application> to <s:Application> ?.  However, it points to


PopUpManager.addPopUp(this, Application.application as DisplayObject);

which is located within DropDownFilterEditor.as



......			
		override public function startEdit(column:MDataGridColumn):void
		{
			editor.startEdit(column);
			super.startEdit(column); // this must be called after editor startEdit to correctly set columns editor instance
			PopUpManager.addPopUp(this, Application.application as DisplayObject);
		}

.........

Open in new window


Using FlexBuilder4

mxml file:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
				xmlns:controls="com.iwobanas.controls.*" 
				xmlns:dataGridClasses="com.iwobanas.controls.dataGridClasses.*" 
				layout="vertical"  >
	<mx:Script>
		<![CDATA[
			import mx.controls.dataGridClasses.DataGridColumn;
			
			public function dateLabelFunction(item:Object, column:DataGridColumn):String
			{
				return dateFormatter.format(item[column.dataField]);
			}
		]]>
	</mx:Script>
	
	<mx:Style source="defaults.css" />
	
	<mx:DateFormatter id="dateFormatter" />
	
	<mx:ArrayCollection id="dp">
		<mx:Object name="John Potter" birth_date="{new Date(1984,11,04)}" />
		<mx:Object name="Emmily Richardson" birth_date="{new Date(1985,3,20)}" />
		<mx:Object name="Michael Berg" birth_date="{new Date(1985,3,4)}" />
		<mx:Object name="Denis Henderson" birth_date="{new Date(1985,5,13)}" />
		<mx:Object name="Sandra Russel" birth_date="{new Date(1985,11,17)}" />
	</mx:ArrayCollection>
	
	
	< -- had to remove <mx:Panel> since FB4 was happy, even tried <s:Panel> still threw  errors -- >
		<controls:MDataGrid dataProvider="{dp}" width="100%" height="100%">
			<controls:columns>
				<dataGridClasses:MDataGridColumn dataField="name" headerText="Name" />
				<dataGridClasses:MDataGridColumn dataField="birth_date" headerText="Birth Date"
					labelFunction="dateLabelFunction"
					filterEditor="com.iwobanas.controls.dataGridClasses.filterEditors.DateFieldFilterEditor" />
			</controls:columns>
		</controls:MDataGrid>
	

Open in new window

0
Comment
Question by:mebibyte
1 Comment
 
LVL 17

Accepted Solution

by:
deepanjandas earned 500 total points
ID: 35023782
That means the compiler is suggesting to use the namespace xmlns:s="library://ns.adobe.com/flex/spark"
in your application tag.

If you do not want to use the spark components, just right click on project to get its properties dialog, navigate to Flex Compiler, and select a SDK below 4.

Warm Regards
Deepanjan Das
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to dynamically set the form action using jQuery.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question