Select to view content in your preferred language

Errors & Warnings

1286
7
07-01-2010 12:09 PM
PatriciaMoehring
Frequent Contributor
New to Flex -- using Flash Builder 4 -- created new project -- imported ArcGIS library -- copied sample src to src directory.  Opened flash and coming up with errors & warnings.  The errors 1046  & 1180 are all related to VETiledLayer -- along with can not resolve a multiname reference nambiguously.VETiledLayer -- I think it has something to do with MapManager.mxml, line 155.  The warning 3608 application has been deprecated since 4.0.  Please use 'FlexGlobals.topLevelApplication' but I don't know what that means.  Same warning reference for 'loadStyleDeclarations' supposed to use 'IStyleManager2.loadStyleDeclarations on a style manager instance'?  Other warnings Type:
'Alert' in CSS selector must be qualified with a namespace
'Application' -- same issue all the way down
'Button'
'CheckBox'
'ComboBox'
'DataGrid'
'HScrollBar'
'List'
'Navigation'
'NavigationSlider'
'TextArea'
'TextInput'
'Tree'
'VScrollBar'

I appreciate any help anyone can provide -- I'm stuck!!  Thanks,
Tags (2)
0 Kudos
7 Replies
DasaPaddock
Esri Regular Contributor
Sounds like you're using the Sample Viewer source code in which case you'll need to change your project settings to use Flex SDK 3.5 instead of 4.X.
0 Kudos
PatriciaMoehring
Frequent Contributor
Ok, now I don't have any errors or warnings but I also do not have a map?  Any other ideas?  Isn't there something I can change to make it compatible with 4? 

If I am using the Sample Flex download -- do I copy folders from flexview1.3 or flexviewer-src-1.3 or both.  Do I also copy folders over from the library download?

Any of you GURUs out there have any ideas?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Patricia,

   If you are working in Flash Builder than you would want to import the flexviewer-src-1.3 as outlined in the FlexViewerDevelopersGuide.pdf. If you are having issues with your map services not showing up than you might check this thread.

http://forums.esri.com/Thread.asp?c=158&f=2421&t=297777&mc=8#msgid929557

If you don't have access to the FlexViewerDevelopersGuide.pdf. Then you can get it from here.

http://forums.esri.com/Thread.asp?c=158&f=2421&t=282642&mc=6#msgid933241
0 Kudos
PatrickRickles
Deactivated User
Ya, I'm going through this process right now myself. I have a Sample Flex Viewer that I've made a lot of customizations to, but as the Scalebar object is incorrect in ArcGIS Flex API 1.3 for Web Mercator, I have to upgrade to the newest APIs/SDKs for ArcGIS, Flex, and everything else.

I've been working on this since yesterday and am into the swing of things now. To start with, remove every single swc (and reference to one) from your project, and then bring in the latest ArcGIS Flex API swc (2.0). Any swc files compiled with the 1.3 version need to be recompiled (ex. Metacarta widget, GeoRSS widget, etc. - anything in the esa folder). As we're not given the source code for that, at the moment, I'm assuming all of these widgets are lost (I didn't use them/customize them, so it's not a big loss).

With just the 2.0 swc in place, go through all the problems and fix them one by one. Lots of stuff is in new locations (ex. com.esri.ags.Tasks.Query is now in com.esri.ags.Tasks.supportClasses.Query) so a lot of import statements need to be updated. Also, some objects now take new parameters/return different results. A lot of the geoprocessing tasks needed an array of graphics, but they now need an array of geometries. Other ones require new settings (ex. QueryTask.useAMF) otherwise they won't work. Just step through everything, have the Flex 2.0 API reference open, and update as necessary.

The last bit, which I'm on at the moment, has CSS declarations requiring namespaces now. Now biggie, just add @namespace mx "library://ns.adobe.com/flex/mx"; to the top of the css file, and change the declarations to mx|<component> (ex. Alert becomes mx|Alert).

There are two CSS declarations that are giving me a problem at the moment: Navigation and NavigationSlider. Obviously they're not in library://ns.adobe.com/flex/mx, so what're their namespace?

Still digging but I'll post when I find an answer...
0 Kudos
PatrickRickles
Deactivated User
Got it: @namespace esri "http://www.esri.com/2008/ags";

Used the new Sample Flex Viewer (version 2.0 beta) for reference.
0 Kudos
PatriciaMoehring
Frequent Contributor
I started over.  Opened flash, imported project src-1.3.  opened properties.  imported lib.  changed flex compiler to 3.5.  closed project.  copied files from ArcGIS Flex samples/src.  opened flash.  still have errors 1046 regarding the VETiled Layer.  I've attached picture.  Now I get everything but no map?
0 Kudos
ShaningYu
Honored Contributor
I started over.  Opened flash, imported project src-1.3.  opened properties.  imported lib.  changed flex compiler to 3.5.  closed project.  copied files from ArcGIS Flex samples/src.  opened flash.  still have errors 1046 regarding the VETiled Layer.  I've attached picture.  Now I get everything but no map?


I got something similar to you.  I did get all of the basemap layers.  But the widgets have no boundary, and the scale slider looks not right (see attached image).
I wish ESRI Developer Team can well handle it for this release and fix it ASAP.
0 Kudos