Almer/Blank Labs

Cool Features in Flash Builder 4

I was recently working on a project in the latest beta release of the forthcoming Flash Builder 4 and wanted to point out the new contextual help feature. What's nice about this feature is that I had just added the highlighted event to the event class and was busy implementing it in a view class and because of FB4's new code-hinting muscle I was able to see everything that I had documented in the event class concerning the event without having to have the event class open. This is definitely a much appreciated usability enhancement. Now, if we could just get editable code (not file) templates (think FDT, Zend Studio, etc), FB4 would be that much closer to being ready for prime time...Big grin

To open aum.flexbuilder.osx, you need to install Rosetta

If you're a Flex developer that's recently upgraded to Apple's latest OS, Snow Leopard, you may run into this prompt when launching Flex Builder 3. This is saying that in order to use the Adobe Update Manager plugin for Flex Builder, you need to install Rosetta. Rosetta which was enabled by default in Leopard, is not in Snow Leopard as Apple tries to push the market towards 64-bit computing. You're perfectly safe to launch/use Flex Builder without this plugin until Adobe releases an updated version. All other application functionality appears unaffected by a lack of Rosetta.

AMFPHP Fatal Errors After PHP 5.3 Upgrade (Part 2)

As promised in Part 1, I'm documenting yet another issue that must be addressed in your AMFPHP installation upon upgrading to PHP 5.3. This issue stems from the usage of the eregi_replace function that has been deprecated in PHP 5.3. If you run into a fatal error in your AMFPHP application with the message Function eregi_replace() is deprecated, you have (2) options:
  1. Modify your PHP configuration to disable the warnings
  2. Replace the deprecated code with the new, recommended equivalent
I'd advise against #1 since you will also lose warning and error notices that could be helpful to you during development. And, by choosing #2 you will be bringing the AMFPHP code into compliance with a change that is also backwards-compatible with previous versions of PHP since the replacement function you're going to use has been around since PHP 4. So, to update your AMFPHP source, you need to modify MethodTable.php which can be found @ /path/to/amfphp/core/shared/util/MethodTable.php. Open up this file in your favorite text editor (ie, TextMate Smiling ) and jump to line 505. Once there, you need to replace these three lines:
$comment = eregi_replace(”\n[ \t]+”, “\n”, trim($comment));
$comment = str_replace(”\n”, “\\n”, trim($comment));
$comment = eregi_replace([\t ]+”, ” “, trim($comment));
with these equivalent lines of code:
$comment = preg_replace('\n[ \t]+'U”, “\n”, trim($comment));
$comment = str_replace(”\n”, “\\n”, trim($comment));
$comment = preg_replace('[\t ]+'U”, ” “, trim($comment));
Save and close the file, fire up your service browser and you should now be good to go with no more fatal errors in your AMFPHP applications produced by this deprecated function. Happy coding! Big grin

AMFPHP Fatal Errors After PHP 5.3 Upgrade (Part 1)

If you experience the following error in your AMFPHP-based applications: PHP Fatal error: Uncaught exception 'VerboseException' with message 'date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead' in /path/to/amfphp/core/amf/app/Gateway.php:213\nStack trace:\n#0 [internal function]: amfErrorHandler(2, 'date(): It is n...', '/path/to/amfphp...', 213, Array)\n#1 /path/to/amfphp/core/amf/app/Gateway.php(213): date('D, j M Y ')\n#2 /path/to/amfphp/gateway.php(154): Gateway->service()\n#3 {main}\n thrown in /path/to/amfphp/core/amf/app/Gateway.php on line 213, referer: http://www.yourdomain.com/path/to/amfphp/browser/servicebrowser.swf You can fix it by uncommenting and defining the date.timezone line in your php.ini configuration file. For my local environment that would look like the following:
date.timezone = "America/Los Angeles"
This, unfortunately, is just one of the things that breaks upon upgrading to PHP 5.3. Stay tuned as I try to catalog them along with the fixes...Smiling

The application Finder cannot be opened -10810

If you have experienced this issue since upgrading your Mac to OSX 10.6, here's the skinny on what's going on and what you can do about it. Basically, this occurs when attempting to access external drives (ie, USB, Firewire, iDisk, etc). Symptoms of this error include a missing menubar (unless an application is active and in focus) and no "active" indicator beneath Finder in the Dock. This particular error can prove to be extremely annoying since the majority of Mac GUI applications incorporate the Finder in the UX (ie, Open and Save dialogs). Luckily, it's not difficult to recover from, just depends on how you'd like to. If you have running processes that you don't want to stop by rebooting your machine, open Terminal and issue this command:
killall Finder
press the Return key and Finder will be relaunched for you without a computer restart. If you don't mind rebooting, I'd suggest issuing the restart command from Terminal vs. using the Apple menu as the latter is prone to be blocked by the current issue. To restart from Terminal, issue the following command:
sudo shutdown -r now
You can replace the -r flag with -h to shutdown instead of reboot. Once restarted, your computer should be back to normal. There are also other options ranging from unmounting the disks, rebuild LaunchServices, applying/reapplying the 10.6.1 combo update and ultimately reinstalling the OS but I believe these two to be the fastest to getting your machine back up and running...Big grin