I recently learned of a fantastic young, visionary, little-know politician named Barack Obama. He's dedicated to a myriad of virtuous causes that match my political leanings in every way and I'm sure that with his charisma and energy he'll go far one day. Please donate to his cause using the widget below!
Wednesday, February 25, 2009
Thursday, February 5, 2009
Flex try...catch...finally bug?
Yikes. The following ActionScript code caused an "unbalanced stack" error when the containing function was called. My intention was to break out of the for loop if the finally clause was hit. Took a while to realize it wasn't even hitting the for loop.
for() {
try {
}
catch() {
}
finally {
break;
}
}
Customizing the Windows Save As dialog
Not Flex related but it's something I've been meaning to get to for a long time: Most of the time when I need to save a file using the standard Windows "Save As" dialog I want it to go in the "Program Files" directory, which means digging through a few layers of directories in the dialog. To save all that digging effort I've added "c:\Program Files" to the list of icons on the left side of the dialog. See this for full details.
The short story is that you have to create a registry key named HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ComDlg32\PlacesBar and add some string values to it for each item you want in the list. The values must be named "Place0", "Place1", etc. each of which contains either a path to the desired directory or a shortcut to it, like "ProgramFiles".
Hey, it'll save me a few seconds here and there...
The short story is that you have to create a registry key named HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ComDlg32\PlacesBar and add some string values to it for each item you want in the list. The values must be named "Place0", "Place1", etc. each of which contains either a path to the desired directory or a shortcut to it, like "ProgramFiles".
Hey, it'll save me a few seconds here and there...
Tuesday, February 3, 2009
Security.allowDomains & wildcards
Got bit by this today: The Flex function Security.allowDomain() can handle "*" as its parameter but not "*.site.com". It would be handy if it did since we don't know ahead of time exactly which domain names our partners will have (especially for dev work) but it makes sense since site.com may not own all domains that end in "site.com". Live and learn...
Thursday, January 22, 2009
Deferred instantiation in mx:Viewstacks
I use a number of Viewstacks in our app and was worried that they would consume a lot of memory since it appeared that all of their children were being instantiated whether or not they were displayed. It turns out that only the top-level children are instantiated, not the grandchildren. That's good news.
Here's the revealing comment from Viewstack.as
Here's the revealing comment from Viewstack.as
// If the policy is ContainerCreationPolicy.AUTO, ViewStack
// instantiates its children immediately, but not any grandchildren.
// The children of the selected child will get created in
// instantiateSelectedChild().
Monday, November 24, 2008
Flex Profiling gotcha when using framework RSL
I recently started using the Flex framework RSLs to reduce the size of our SWF, then just yesterday I tried to run the profiler on it and got a "Profiling can only be done on debug versions" error. My SWF was built for debug so I couldn't understand why I was getting those errors. It took me a while but I finally found a blog post that pointed out the obvious: the RSLs are release builds. So to profile my app I had to turn off the RSLS (use Merge into Code option).
Friday, November 21, 2008
Subscribe to:
Comments (Atom)