This is more of a rant than a question; but I am curious to know if anyone has some insight for me. The application I am working on deals with a C# .NET backend; communication is achieved via a socket over which we push AMF objects. The AMF object class definitions are generated by the server side team and I just have to use registerClassAlias
on the flash side to link them up - pretty standard; the only difference being that as they come from a C# background they prefer to use UpperCammelCasing instead of lowerCamelCasing for property names.
Today I got a bunch of updated AMF objects which I dropped into the project; but I noticed that after updating my project would no longer compile - here are the class definitions in question:
LeaderboardInfo.as Generated Class
package com.generated {
public class LeaderboardInfo {
public var IsTied : Boolean;
}
}
GameResult.as Generated Class
package com.generated {
public class GameResult {
public var LeaderboardInfo : LeaderboardInfo;
}
}
MXMLC error
[mxmlc] .../GameResult.as(27): col: 32 Error: Type was not found or was not a compile-time constant: LeaderboardInfo. [mxmlc] public var LeaderboardInfo : LeaderboardInfo; [mxmlc] ^
If I change the property name from LeaderboardInfo
to SomethingElse
then it compiles fine; my only guess would be that the Compiler can not distinguish between the property name and the type attribute, but is that really the case?!