If you do have binding this can sometimes come up.  The way to eliminate it for sure (I think) would be to eliminate any bindings in the components that claim there are cycles and just use event handlers to do your variable assignments.

 

Unfortunately there isn’t a good way to debug what’s going on, I spent a lot of time trying during 1.0 and 1.5 development.  It may be that you have UserDetailWindow which refers to chat which has a binding to something else which has a reference to something else which has a binding to UserDetailWindow, etc.

 

Thanks to Joe for posting his workaround.  As he says, this is supposed to be a rare case which is why we did not re-write the compiler (which was the only feasible solution after we eliminated the issues for most cases) to address the problem.  Many developer-hours were spent getting it down to the rare case J  The reason why binding tends to be the cause is because of how we generate code after the parse phase, and then re-analyze the results.  For some reason on the second pass the compiler occasionally fails to re-asses the dependency order and therefore screws things up (I think).  The bug is actually higher up in the compiler, it just gets exposed by using binding.  I wish I could explain it better, probably if I could we would have solved it J

 

Matt

 


From: Eric Raymond [mailto:[EMAIL PROTECTED]
Sent: Friday, March 25, 2005 11:41 AM
To: [email protected]
Subject: [flexcoders] Cyclical References

 


Are there any tools or suggestions to diagnose the problem further
and/or resolve it?

Sometimes my flex application fails to compile with the following message:

03/25 09:22:50 ERROR flex.compiler.HtmlOutputHandler: Results of
compiling ... /App.mxml
5 Errors found.
Error .../UserDetailWindow.mxml:53
Cyclical reference to class Chat. Two MXML Files cannot reference each
other as child tags

I understand the notion of a cyclical reference, but do not see it in
this case.  UserDetailWindow refers to Chat, but there is no apparent
connection from Chat back to UserDetailWindow.

I am able to get the program to run perfectly by commenting out the
line with the Chat component and visit the app to cause it to compile.
Then I uncomment the line and the program works as expected.  It
seems that Flex incrementally compiles only the files that have
changed and this somehow bypasses the problem.  This workaround is OK
for development, but not for production.  Still it is a bit scary.

Any ideas?







Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to