Created
March 5, 2012 13:51
-
-
Save sunchess/1978397 to your computer and use it in GitHub Desktop.
flex error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error #1034: Type Coercion failed: cannot convert Object@ee052671 to com.raka.mapeditor.model.Area | |
package com.raka.mapeditor.model | |
{ | |
public class Area | |
{ | |
public var id:Number; | |
public var name:String; | |
public var iso_width:Number; | |
public var iso_length:Number; | |
public var area_buildings:Array; | |
public var area_props:Array; | |
} | |
} | |
[22:12:48 MSK] deGreez: private function onSuccess(data:Object):void | |
{ | |
trace(data); | |
try | |
{ | |
var areas:Array = data.areas; | |
// remove hometown areas | |
for (var index:int = 0; index < areas.length; index++) | |
{ | |
if (Area(areas[index]).name == "Hometown") | |
{ | |
areas.splice(index, 1); | |
index--; | |
} | |
} | |
Building.prototypes = data.buildings; | |
Prop.prototypes = data.props; | |
dispatchEvent(new StaticDataLoadedEvent(areas)); | |
} | |
catch (e:Error) | |
{ | |
Alert.show(e.message, "Error"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment