Solved

application has been deprecated since 4.0-use FlexGlobals.topLevelApplication

Posted on 2011-03-01
1
1,025 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

860 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