I tend to reserve TOs (Transfer Objects) as the objects I pass back and forth over the wire between Flex and Java and use VOs (Value Objects) as encapsulated data that I pass around my client (only), usually after collecting data from a view and passing it to a CairngormEvent, so I would like to create a package structure that looks like:
com.domain.project.to
and
com.domain.project.vo
respectively…but I can’t.
Unfortunately, the “to” in the package name is a reserved word in AS and throws an error when you try and compile classes with this namespace. My buddy Jon Marston encountered this on our last Flex project, and I forgot all about it until I went to implement it on my current proj…just some advice for anyone else that runs into this issue. I renamed the package to:
com.domain.project.transfer
0 Responses to “Flex / AS3 Reserved Word “to” in Packages”