Solved

application has been deprecated since 4.0-use FlexGlobals.topLevelApplication

Posted on 2011-03-01
1
1,019 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to count occurrences of each item in an array.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now