Why can't I build a swc in my Flex Builder Project after pasting a class? - flash-builder

This may be a bug report for Adobe, but thought I'd ask here for workarounds...
When I create a new Flex Library Project, a .swc is automatically created in the /bin folder. When I add a new class, the .swc is updated (I can tell by looking at the 'last modified' timestamp of the .swc). When I edit that class, the .swc is also updated. This is all as expected, since Project > Build Automatically is checked.
However, as soon as I paste in other classes, I can no longer update the .swc.
The datestamp does not change, no matter what edits I perform.
Unchecking and re-checking Project>Build Automatically does nothing.
Even worse, Project>Clean deletes the .swc file, and I cannot recreate it!
Is there any way to force Flex Builder to build a .swc?

I figured it out. The classes I pasted into the Library Project had dependencies on other classes that were not present in the project. This caused build errors. Those build errors caused the .swc compile to fail silently.
I didn't notice the build errors in the Problems pane, and Flash Builder didn't notify me that the compilation failed, so I was floundering around looking for answers in the wrong places.
More here:
http://words.transmote.com/wp/20120511/flex-library-project-build-errors/

Related

How to use methods from one project in another project with Intellij?

I have set up a project, which has a method that I want to use in another project. I tried adding the other project (the one that I want to get the method from) into my dependencies. However all this seems to have done is make so the errors in the text editing space disappear, but when I run the code I still get the errors that I would have gotten without adding the dependency.
The error report was pretty basic and just said that it can't find my symbols.
Also, the method that I want does autocomplete so clearly it is being detected, but for some reason just when I compile it does it encounter an error.

Debug Design Mode in Visual Studio not breaking

So I am currently unable to open a Form and get the following error:
System.ComponenetModel.Design.ExceptionCollection was thrown.
or:
The designer loader did not provide a root component and has not indicated why
Usually the way to solve this is to open another instance of Visual Studio with the same project, attach the debugger to the other Visual Studio and try to open the form.
However, that does not seem to be working. The debugger does not break when the error is hit, and attempting to 'Break All' at any other point does not show me the source code and just the screen saying:
Your app has entered a break state, but there is no code because all threads were executing external code (typically system or framework code).
Attempting to put break points also results in:
The breakpoint will not currently be hit. No symbols have been loaded for this document
Am I missing a setting? Incorrect Setup?
I have been battling this for half a day and thoroughly search the interwebs with no luck thus far. My designer is also fairly complex and lengthy which means trial and error is an absolute last ditch option.
First attempt to resolve:
you may have tried it already. Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution.
Do a rebuild of the solution and try to debug again.
Second attept to resolve:
Start debugging, as soon as you've arrived at a breakpoint or used
Debug > Break All, use Debug > Windows > Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one.
In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe. The bin\Debug folder of your project. Make sure you remove one from the GAC if you've been playing with it.
third attept to resolve:
Disable the "Just My Code" option in the Debug/General settings.
there are might be other causes to your problem, i picked them from here. you may try other solution to try resolve your issues. Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

VB NET class is recognized in VS, but I get a 'Type is Undefined' error on build

I am working on a VB NET project and had the strangest thing happen.
I created a class file(just like a dozen or so I have already created). I wrote in the code to access it. The autocomplete found the class, filled it in and colored it blue, just as it should.
But, when I run the app, I get a type is undefined error.
There is nothing in the class yet. And there is really no code to post..it is as straight forward as I described.
I tried restarting VS; Deleting and recreating the class; Deleting the class and creating a new one with a different name.
Is there something in the VB NET configuration I can check to see if it is not being added somewhere?
lee
Ok. I found the problem. I have 2 projects in one solution. They both share some classes that were trying to use my new classes. When I hit F5, both projects are compiled, and since I hadn't shared the classes with the second project, it errored.
So, now my question is changed; How do I specify to only build the specified Startup Project when debugging?
lee
Right click your solution -> properties -> configuration properties and untick everything you don't want to build.
And for your original question, check if build action on that files that don't compile is set to 'compile'

Code loses syntax color in Xcode 4

I have just upgraded to the new Xcode 4 and the code is not colored has it ought to be.
For instance, the string NSString is not colored in my custom code, but when I switch to Apple's code (NSString.h for example) everything is well colored.
How can I fix that?
It's a known bug with the latest XCode. This happens with some projects which are migrated from XCode 3.X to the new version. For some people it seems to help to go to the organizer, and in the project tab delete the derived data for the project where code sense does not work correctly.
If you have a small project, it might also help to create a new project in XCode 4 and import the files from the XCode 3 project.
Update: XCode 4.0.1 made the situation a bit better, at least in some of my projects I have syntax coloring and code sense back. But it's still far from fixed.
Update 2: XCode 4.0.2 did not change much. It seems that the problem is related to subprojects, specifically static libraries. According to comments of this blog post some people were successful by changing header search paths from relative to absolute paths, e.g. instead of Foo/Bar use $(SOURCE_ROOT)/Foo/Bar. This together with switching all projects to XCode 3.1 format and to use LLVM 2.0 fixed a lot for me as well. It's not perfect yet, but usable.
Update 3: After converting the sub projects to independent projects and putting them in a workspace (aka the XCode 4 way) I have now full syntax highlighting and code completion back.
My current environment is now a XCode 4 workspace with each projects being 3.1 compatible (as opposed to the default which is 3.2), LLVM GCC 4.2 (system default) and the header search paths are still absolute (using $(SOURCE_ROOT)/.../).
I used undefined Macro, But those macros defined in Preprocessor Macros in build settings. So the xcode4 didn't generate any error for that undefined macro.
Steps taken to resolve.
Removed undefined macros wherever I used those undefined macros.
Removed duplicate definitions of Marcos.
Removed duplicate Resources. (I'd added same (many Thumbs.db files) files into the project.)
Clean & Build.
if still you are not getting the color then, please relocate your project to some different location, I changed to my Desktop location.
After these steps I got the color in my eyes.
But its very bad issue. I sucks lot of valuable time. I think these steps may help you.
Thanks.
I had the same problem with mine. Its a cocos2d game with box and chipmunk. It was a hell of a mess getting the project to recognize and find the user search paths in the first place so I wasn't about to mess with those.
What I wanted to point out is that I DO HAVE recursive paths and I do have relative paths and I still got the issue. It happened when I added a new version of a 3rd party SDK I was using. It was Testflight 083 which I updagraded to 1.0. I erased my old version but only removed references. Then I manually deleted it from finder. Imported the new SDKv1 folder and readded it to my project and removed the old SDK0 folder path leaving only the newly added SDK1 folder path. For some reason I noticed that even though in v083 I had used a #import in my Prefix.pch file, it still wasn't recognizing a call to a method from AppDelegate. Which means the #import in Prefix.pch for some reason was not working. I had to add #import to my AppDelegate file individually. This gave me duplicate #imports as Jeeva said above. That sounded an alarm in my head.
So the solution was to go and effectively remove the duplicate #import in Prefix.pch therefore only leaving the one in AppDelegate. It reindexed and CodeSense works again. Thanks Jeeva!
This issue was driving me insane, and I had given up hope of fixing it without some ugly hack on XCode's configuration. I passed through this very forum thread a stack overflow of times. Then one day, I happened to accidentally fix it. I'm not sure if you need all these steps, but I've found this a sure-fire way to fix XCode's indexing issues:
Clean your project (Command-shift-K)
Open organizer, close your project.
Under the "Projects" tab in organizer, remove the derived data for the project you want to reset.
Quit XCode
In the terminal, run:
sudo mdutil -a -i on
This seems to reset spotlight indexing (I don't know much about it because I don't use spotlight).
When the command finishes, Spotlight will have to re-index. Look up to see a little dot in the magnifying glass for your spotlight's icon. When the dot leaves, spotlight has re-indexed. You can check the progress by opening spotlight.
Re-open XCode, and wait for it to re-index all your files.
Build the project.
On build success, you should now have appropriate syntax highlighting again. I hope you guys find this little discovery as useful as I did :)
EDIT:
I should probably add that the syntax highlighting sometimes seems to re-break when the debugger hangs the simulator during app launch. I just try to avoid this by being more careful about letting the process hang.
EDIT2: (sorry first contribution)
Works on XCode 4.6 and 4.6.2.

Force reload of a referenced .Net component in VS2005

We have a VB project that loads a reference to a .Net dll (which we also make). Both projects are being simultaneously developed.
When we add new classes to the referenced dll, the main project normally fails to notice the changes.
That is, if we added a new class Bar to the Foo dll, we should be able to type "Foo." and have Bar listed in the intellisense dropdown. It's never there.
Removing the reference and then adding it back in again sometimes fixes the problem. Sometimes we have been able to just manually type Bar in and then rebuild without errors.
It seems to me that there should be some way to tell Visual Studio to reload the referenced project because it has changed. Actually, I think VS should notice the change itself, but failing that, we need a simple way to force a reload.
Any suggestions?
Edit: It is VS2005 and we are referencing output assemblies (the dll)
I had this problem once. Put both projects into a single solution. Right-click on the Solution in the Solution Explorer, and set the build order. Make the main project dependent on the .DLL. Now, when you rebuild the solution, the .DLL gets built first, and the main project will see all the changes.
EDIT: Also, reference the .DLL as a Project instead of selecting Browse when choosing a reference. Then, the changes should be immediately recognized by the main project without rebuilding.