Flex Combobox closes automatically - apache-flex

I needed to make some changes to an air application that I made 2 years ago. The thing is: it is still written in flex3 and compiled to AIR 1.5. I didn't have the original project in flashbuilder, so I imported the source code in a new project.
I have tried to compile with flex 4 with backward compatibility, but that didn't work for me. So i deceided to compile with flex 3.5. Everything seems to work, except for the comboboxes.
When I click on a combobox, the dropdown opens but closes immediately. I have searched on this problem, but I cannot find a solution. It is just a standard combobox with 1 dataprovider. So no data is changed.
Does anyone know about this bug? How can I find out the compiler settings from an old AIR file. Maybe I can try to compile with the original SDK.
Thanks in advance!

it is because you must have put editable="true". I had the same issue and solved it.

Related

Intellisense not working in Flash Builder 4

I don't know if the correct term is intellisense, I'm talking about the helpers you see when you place the mouse over something. (The /** * */ helpers)
For some particular (business) reasons I need to use Flash Builder 4.0, the problem is, all kin of intellisense is gone, I put my mouse over anything, and no intellisense appears, nor in basic AS3 methods (Math.function) nor in Flex ones.
Any ideas?, I've been using FB 4.6 for a long time, and I never had this problem before.
Thanks!.
it worked in FB4.0 as well, so either it can be an installation problem, or the SDK the project points to doesn't contain the documentation. Try a new project, see if there works. If not, try reinstalling it with default settings, and see if it works.

AIR: components in window-based mxml component are frozen

SUBJ: creating a window-based mxml component, but in design mode all components that I'm adding are not movable, why? If I create component based on group f.e., it's ok, but based on window - they are frozen. Using Flash Builder 4.6
I guess it's a bug that Adobe needs to look into.
But in the meantime, you can use <mx:Window> and change them all to <s:Window> before you will finally build the release version of the project.
I am facing the same problem and it's very frustrating.
I don't know whether it's a bug or not, but it happens in Flash builder 4.5 too.
What I figured out so far is that instead of using a <s:Window> you can actually use a <mx:Window>and then it will work as expected.
In the other hand I would like to be able to use the spark window instead. It's a very annoying tiny problem!

XCode 4 breakpoints not breaking at correct line

My breakpoints have stopped working properly in the latest XCode 4 release. With no change to the project settings, the breakpoints no longer break at the line they are set.
For instance, in one function I can set a breakpoint anywhere within it's body, but the code will always break at the last line of the function.
In another instance, I can set a breakpoint anywhere in one function and the code will break at a line in the middle of a different function in the same file! Tracing through after the break shows that it did break in the wrong place and it's not just a file / debugger sync issue.
I have no idea why this has started. It did however seem to start on new breakpoints while old ones worked. Any new breakpoints I add break in the wrong place. And recently, some files now don't even break at all! I can only assume the breakpoint is so wrong it's moved into code that's not called. I have done numerous internet searches and forum searches for this problem, and although I have found people with similar issues, there was either no solution or the solution listed (rebooting device, swapping debug output, turning off optimization etc.) haven't worked for me.
It is worth mentioninig I'm mostly coding in C++ using .mm files. For the past year of development in XCode 3, and for the last few months in XCode 4 things have been fine! I have debug set up correctly. No optimization on a debug run, no dead code stripping and I'm using the LLVM compiler 2.0 with DWARD with dSYM debug file. However, changing these values makes no difference.
Please help, it's driving me mad!!
An update to this. It's started happening again on a brand new machine with a fresh Lion and xcode install. The whole editor is out of whack. Example below of the errors appearing on the wrong lines.
From what I've read all around, Xcode tend to get confused with breakpoints and the way to get rid of the out-of-sync problem is to clean the "Derived Data"; two ways of cleaning it so far I've found (instructions are valid for Xcode 4.x) :
a) go in the organiser, under the Projects, choose your project and hit that delete on the Derived Data
or
b) go in the Product menu, hold the ALT button on the keyboard and observe that the menu are changing... so the clean transform to "Clean Build Folder..."
With-in "Build Settings" under the project target change the "Optimization Level" for "Debug" to "None".
I found that this fixed the issue for me.
I have fixed this, although I haven't found the root cause.
I removed the references from the project for the files that were not working with breakpoints. I then did a full clean and went into the folders and deleted any build and temporary data. I then opened the project bundle and deleted all data except for the project file itself. I then compiled so it threw up errors due to the missing files. I then put the files back in the project.
Now, the exact same files work fine with breakpoints!
No idea why but happy it's fixed.
Have you cleaned your targets? Shift-Cmd-K.
This started happening to me after I upgraded to XCode 4. I just deleted all breakpoints, did a clean, then re-added my breakpoints. Seems to work OK now.
I have figured out why this happens now. As mentioned in one of the replies you can fix it by deleting the derived data. This will always fix the problem. The editor for some reason loses it's relationship between the source code and the markup of the code it uses to cross reference breakpoints and errors etc. Deleting the derived data forces it to recreate this.
I believe that this only happens with files using C or C++ code. Apple seem to ignore C++ developers on iOS. I know a lot of professional game developers and every single one uses C++ to write games. Apple's lack of support is annoying.

How do I display content assist in flex builder for all classes?

I have a components and classes project library. Within the library, flex builder only seems to display content/code assist options for top level classes (e.g. arguments, Array) but not other classes such as VBox. Also, within the non top level classes, class properties are not provided by content assist.
In my other flex projects in the workspace, content assist works fine.
Any help would be greatly appreciated!
Flex / Flash Builder is often inconsistent in stuff like this; but I have never seen the exact situation you describe.
Have you tried closing down and relaunching Flex Builder?
Have you tried launching Flex Builder with the '-clean' attribute?
Have you tried cleaning your workspace?
Are you sure you do not have a syntax error somewhere causing issues? Are all the classes in the library included in your library class? Sometimes error don't show up if the class is not used, and therefore not compiled into the file SWC.
Did you save your source files? I don't think Eclipse updates its index until you save - so, if you just wrote class X with function Y, but didn't save X.as, then Eclipse won't know what to do with X.Y(...
Sometimes when I've run into the problem you're describing, it's been because FB wasn't able to determine what type of object I was using (for example, obj["toto"] = ?).
Another idea may be to update your version of eclipse ("Software Updates" or something like that under the Help menu).
Finally, there's an annoying issue that happens to me sometimes where the content assist will appear for about half a second, then disappear like the window tried to scroll and lost the pop-up. Do you get anything when you press Ctrl-Space?

Flash Builder 'building' html files

I'm using Flash Builder 3 to edit my Flex app, but I noticed that every time I make a change on the .html files (index.template.html for example), even if it's not in the IDE but with another program, Flash Builder rebuilds the whole project.
Is there anyway to stop this? Why would it need to rebuild the workspace everytime a html file changes?
If it was too long it wouldn't bother me, but it takes a lot of time (more than 1 minute) every time. For your information the html file is 95 lines of 'code'.
Thanks
In the main application menu, make sure Project->Build Automatically is unchecked. That will stop it from automatically rebuilding your project every time a file changes.
Looks like it's the HTMLWrapper that takes a long time for compiling.
If you encounter the same problem, you can deactivate the wrapper generation in the compiler option.
Ive written a short article about how to edit index.template.html so that your swf will centre on the page similar to Flashdevelop centering. You might find that useful, I wrote it mainly to explain to myself and the technique works fine.
See
http://www.thumbleaf.com/journal/?p=239
, Thomas

Resources