0

I am making some changes to a Flex 3 project and have run into trouble. I am using Flex Builder 3, working on a PC. Everything was working as expected throughout my first day of code updates, but on day 2 Flex started behaving badly.

The problem started when I removed a component, and then got an error that it couldn't find the specified component in some accompanying AS3 code. No problem, I updated the reference so it wouldn't look for the old missing component (a form item). When I compiled the project in debugger to check my work, it failed when it got to that part, and gave an error that it couldn't find the component I'd removed. However, my code had fixed the problem, and the error was referencing a line of code that wasn't there any more. I proceeded to change the file around greatly, and even resorted to creating a new file, changing the name of it, and then recompiling it. I did a clean compile as well, rebooted my machine, restarted Flex, but every time it gives an error referencing the bit of code that isn't even there any more. It's as if it's loading a cached project each time (both in debugger and run mode).

For reference, here's the error I'm getting:

ReferenceError: Error #1069: Property Winter Cost not found on views.PopupUsage and there is no default value.

Well, the file "PopupUsage.mxml" doesn't even exist any more and is not referenced in my project at all, but it's still being referenced by Flex when I compile the files. Any ideas? What can I do to make Flex move on and look at my code?

Thanks in advance!

  • If it weren't referenced in your project, it would not throw an error. There must be an indirect dependency somewhere. – weltraumpirat Feb 28 '12 at 19:50
  • I do not have any errors in the project, nor are there any warnings. – Brad van Orden Feb 28 '12 at 20:58
  • The file is not referenced anywhere in the project. In Flex Builder, when an error is thrown during debugging, you can view the heirarchichal list of where the reference came from. In this case, it shows the heirarchichal list showing where the file used to be, and also lists the old line numbers (no longer corresponding to anything). Also, when the script fails and Flex Builder pops up to show the error, it can't find the file to show the error (since it doesn't exist), but it still says there was an error in it. It's clearly running some kind of cached project, but I can't figure it out. – Brad van Orden Feb 28 '12 at 21:01

1 Answers1

0

The only time I have encountered this issue is when I've been developing an application that uses another SWC in the project build path. Where I've come undone is not referencing the SWC project in the project properties build path, but only referencing the SWC itself. If you have the SWC project code imported and you're editing it, then you can see this type of behaviour, appearing as though there's a mysterious cached version of your app, where in fact its simply the build path that isn't quite right.

So check your project properties build path for this issue, it sounds obvious, but I've lost count of the amount of times I've quickly imported the code for a library and forgotten to reference it properly in the application I'm using it in!

Jeremy
  • 3,418
  • 2
  • 32
  • 42
  • That doesn't appear to be the issue. I ended up quitting for the day since I couldn't figure it out. Today when I fired up Flex, the problem ceased to exist, at least at that line. I made a change to the code, launched the debugger, and then it fired an error at a different line where there used to be a problem. Basically it had cleared its cache from the previous day, and used my first launch of today as a new cached project. Now I'm having the same issue, but with a cached project one day older than last time. Seems to be some kind of cache given this new development. Any idea? – Brad van Orden Feb 29 '12 at 17:38
  • Just out of interest, are you using Subversion? – Jeremy Feb 29 '12 at 18:10
  • Also there is a post here which has a similar question, and has an accepted answer http://stackoverflow.com/questions/290768/flex-builder-3-executing-old-source-codes – Jeremy Feb 29 '12 at 18:25