Project run issue in Flash Builder 4.5 - apache-flex

When i change the code into my Flash Builder 4.5 project and hit run the output doesn't show the new result but the old one, only after a while the new result is showed on subsequent project runnings. Has anybody encounter this problem? Are there some hidden settings?

First make sure you have the project set to build automatically. ( Either that or that you have manually rebuilt the project after changing code).
Second, be sure to clear the relevant browser data as appropriate.
Third, In the earlier days of Flex, I found that if I re-compile code while there is an active debug session; it often doesn't refresh and would need a formal project "clean" after shutting down all my browsers, and restarting Flash Builder. So, that may also apply here.

Might be a spot old but if you are testing in a browser you might want to refresh or clear your cache so the browser has to get the new data and not just rely on what it had loaded before.

Related

Cannot use Export Release Build

I've just moved to a new computer and imported all of my Flash Builder projects. When I try to Export a Release Build I get the following error message:
Encountered errors or warnings while building project Test.mxml.
Linked resources are not supported by this application.
I get the same message for a new project as well as for an old project. Restarting FB makes no difference. Can anyone point me to a solution?
I doubt if you really need to reinstall the OS! You might have to restart Flash Builder.. and that should clear any issues associated with cached objects etc.
Check and see if there is really something wrong with your project.. if you don't seem to find anything, create a new project - just an empty one with a button on the canvas and then try exporting a release build.

After MVC3 publish, just update the views

.NET/MVC3 newbie, so please bear with me!
I've searched for this answer all over but cant find exactly what im looking for, so here it comes...
Lets say that i'm developing an MVC3 app with Visual Web Developer Express and i go about deploying the site using the built in publishing tool.
But now that my site is up and running i find that i need to make a minor adjustment in one of the views. I update the view and save the file, and use my FTP program to upload the new file.
The problem is that MVC3/.NET doesn't seem to refresh/change the view, because it's still using the old version.
Of course I have tried refreshing (in many different browsers even), but it still won't load the new view.
Is this normal behaviour, meaning that i have to publish every time i make some minor adjustments (kinda time consuming)? I really can't imagine that this is the case, so i'm wondering if you could shed some light over this?
Appreciate any replies!
/Mikael
If you upload the view (.cshtml) file and that is the ONLY part of the application that has changed, a refresh will reflect the change - you may have to ctrl+f5 to clear the temp cache. However! If you change ANY of the controller code or action code, or any c# (or vb if thats what you use), then you MUST re-upload the compiled .dll associated with the entire application in order for the changes to be reflected.

clean project in flash builder on debug launch

Using Flash builder 4 to build an AIR app.
I keep having my code changes not take effect when I launch the project with the debugger, probably happens about once an hour. So does anyone know how to have FlashBuilder clean the project automatically before each launch?
Thanks
I'm having a similar issue with a Flex application. If I make a change to an .as file the change is not taking effect. The component is being instantiated by a parent component in the application so the compiler should be catching any changes I made. In fact, I can put a syntax error in the file and it won't report a problem. I've uninstalled and reinstall Flash Builder 4. I have to do a clean every time. I tried the tip from rakslice's comment of compiling with mxmlc manually and it successfully compiled without any clues as to what the issue with incremental compiling in Flash Builder 4 is. I finally added "-incremental=false" to my project's additional compiler arguments. This takes longer to compile of course, but I find it easier than having to click Project --> Clean every time.
I find that as long as I don't change code and/or recompile while an active debug sessions is on-going; I have no issues with the application not picking up code changes between subsequent runs.
I'm finding that I have a very similar problem. Everytime I launch my Flex app in a browser I have to perform a Clean just to get it to run.
I have noticed that I get a JavaScript error saying 'swfobject' is undefined odd error to be getting.
Not sure if that helps?

remoteObject Fails After Recompiling Using CF8

I've been handed a Flex project that was originally built and compiled using Flex3 and CF7. My setup is Flex3 with CF8. Everything works fine when I initially pull the project over but as soon as I recompile, remote calls to the CFCs begin to fail. I used Charles Web Proxy debugger and discovered that the failure appears to begin with the flex2gateway. I double checked to make sure the flex2gateway is accessible and it's working fine on my CF8 install from both my project root and localhost. I also double checked to make sure that my project settings directed the Flex Compiler to reference my CF8 wwwroot for the services-config.xml. As far as I can tell, all of my settings are correct. So, needless to say, I'm at a complete loss. Has anyone else encountered this problem before?
Thanks,
--Anne
Actually no errors are getting thrown which is really weird. However, after some further testing and experimentation, I did find something rather interesting. I went ahead and created a new project where the bin-debug files were all output to the web root. When attempting to call a CFC with that setup, it worked fine which is kind of strange. As soon as I started to set it up in the same file structure as the project, it stopped connecting. The file structure of the project is as follows:
_flash
main
bin-debug
libs
src
com
Test
Test.cfc
index.cfm (this is the same as the html wrapper that's usually generated in bin-debug. We have it in the root so that we can pull either the release or debug versions depending on which server we're using at the time.)
Based on this, my thought is that for some reason it's not looking to the server root for com.Test.Test and is instead just looking within bin-debug. Does that make sense? What's maddening is the utter lack of errors.
--Anne
After toying with this for considerably longer than I ever should have, I've decided to use JSON for remoting instead. This is mainly because JSON makes it considerably easier to find out what's going on under the covers when debugging. Thanks for your help everyone.
--Anne

Edit source code when debugging

I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."
I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions?
This may seem counter-intuitive, but turn edit and continue off.
There might be another "allow me to edit read-only files" or "allow me to edit even when I am debugging...no really!" setting somewhere, but I don't have 2005 to look at to check.
In 2008, turn off edit and continue and you can edit while it's running (but those changes aren't appplied.)
If you actually want to use edit and continue, you also have to enable it for the project, on the web tab of the project settings.
The application is actually running off of a compiled version of your code. If you modify it it will have to recompile it in order for your changes to work, which means that it will need to swap out the running version for the new compiled version. This is a pretty hard problem - which is why I think Microsoft has made it impossible to do. It's more to protect you from THINKING some changes were made when they really weren't.
For Asp.net it is possible to think of two types of 'edit and continue'.
One is a classic edit and refresh the browser. This works because the browser refresh recompiles everything except precompiled code behind files. This is not referred to as Edit and Continue, though in practice it provides a similar effect. In this mode you cannot change code behind files, because they were precompiled and deployed, but you can change just about anything else.
Another mode allows you to change precompiled code behind files but nothing else ... (this is the mode Chris Bilson mentions which needs to be set on the project properties for ASP.Net). In this case you are using the Edit and Continue feature of the debugger, which knows preciously little about ASP.net. The debugger just sees a loaded .Net assembly and can modify it when stopped in the debugger because there is a project in the solution that claims to know how to build it. In this case you are prevented from modifying things that would otherwise mess up the debugging session. This method however is the only way to change the code while it is running rather than requiring a browser refresh.
You are allowed to make changes to the *.aspx file while it runs, and you can hit refresh on your web instance to see those changes immediately. However, you cannot make changes to the *.cs/*.vb or *.designer.cs/*.designer.vb files while the program runs.
I search for this on Visual Studio 2008 WAP (Web Application Project) and it took me two days to find the solution, so here it is in the hopes it helps somebody else:
There are two locations that have to be checked, one it under tools-options-debugging-Edit And Continue-Enable Edit And Continue, the other is right click project-properties-Web-Enable Edit And Continue
For the record, I had a similar problem with VS 2008 and a different solution resolved the problem for me. Editing code in Visual Studio 2008 in debug mode
Check that you are not in release mode.
In release mode you cannot edit your code while debugging. Just change mode to Debug

Resources