June 01, 2007

coldfusion 8 minor flex annoyance

if any of your coldfusion 7 CFC methods have a return type of "any" these will probably fail in coldfusion 8 and flex w/the dreaded TypeError: Error #1009: Cannot access a property or method of a null object reference error. the public beta seems to have made type conversions to flex more "rigorous". you should also watch out for cases where your return type is "struct" and you're really returning a typed object, cf8 will blast away all the object bits & turn the returned object into a real coldfusion structure (ie your object's key case will become UPPER case and since flex is case sensitive this will lead to a certain amount of head scratching). in almost all the cases i've looked at both of these cases were simply sloppy coding/QC (majority were left over from my dithering around about exactly what to return to flex, "any" worked well in those cases ;-) & could be "fixed" in a few seconds.

while it's a short term annoyance i think this is probably for the better long term.

Labels: ,

2 Comments:

At 6/02/2007 1:57 AM, Blogger Tom said...

Even though this may make for better code, we have fixed this for the final release.

 
At 7/17/2007 12:45 AM, Blogger remotesynth said...

Glad to hear Tom because it completely breaks ColdSpring's auto-remoting feature.

 

Post a Comment

<< Home