personal weblog of a tech addict
Posts tagged OSX
Upgrading Flash Builder
Mar 1st
Whether you’re upgrading because you’re using BETA versions that change rather frequently or upgrading to the next major release, you don’t want to lose all your hard work invested in configuring your setup. Here’s how I handle it and hopefully it’s useful to you. If you have other cool ways to persist workflows between upgrades, please share them.
Workspaces
I’ve created a workspaces folder in a custom directory on my HD where I store all the workspaces I like to use with Eclipse-based IDEs. I separate them by IDE and then by purpose. So for Flash Builder, my workspace hierarchy is like this:
/workspaces
/_fb4
/air
/as
/flash
/flex
This is where all of my IDE preferences and workbench layout settings are stored. Centralizing them here allows me greater flexibility when upgrading since I never have to worry about any changes to installation procedures overwriting my custom settings. Nevertheless, I backup my workspaces prior to upgrading and since their small text files it only takes a second to archive.
Documents Directory
On OSX, the Flash Builder installer creates an Adobe Flash Builder 4 directory in your Documents directory. The installation instructions advise you to uninstall any previous versions of Flash Builder before installing the new version. Following this advice will delete this folder if it already exists. So, be sure to back this up prior to uninstalling your current version. That way you can cherry pick anything you need after installing the new version.
Applications Directory
You should also backup up your program installation in your Applications directory for the same reasons as with the folder in your Documents directory. If you’ve heavily modified your install with additional plugins, etc., this is vital!
Plugin Restoration
Where are all my cool plugins? They got wiped during the upgrade process but if you followed my advice and backed everything up, you’ll be back up and running in a minute or two. There are generally (2) locations where plugin info is stored for Flash Builder. If you pull the data from your backups and place them in the following locations, you should have full access to all your plugins post-upgrade (provided they still work with the latest release)
#1 – /Documents/Adobe Flash Builder 4/.metadata/.plugins
#2 – /Applications/Adobe Flash Builder 4/plugins
Although this post is slanted more towards upgrading on OSX, it should be similar for other operating systems. Any issues, let me know…
GitX Tweaks: Commit View
Jan 17th
So, after thinking about my most recent updates, I decided I wanted to change the way that the commit view looks but just slightly. This is my 1st pass on some things I’d like to have available via the toolbar.
Would also like to tweak the view selector buttons, revise remote selection and add toolbar buttons for all the contextual menu items, which aren’t many.
GitX Update: Remote Selector
Jan 17th
Previously, I implemented toolbar buttons where each button was tied to a specific remote repository. This was/is fine if you’ll only be working with one or two hosts but becomes cumbersome when dealing with multiple hosts.
Enter the NSPopUpButton. By switching to this UI element I’m able to allow a user to select a remote from a configurable list of remote repositories. I like this UX slightly better than having a button for each remote and the functionality behind the scenes still reaches the same result.
Now with that out of the way, I can move on to some other items on my TODO list…:)
GitX: A git GUI for OSX
Dec 4th
GitX is a git GUI made for OSX. It was created by Pieter de Bie and is a really solid tool for working with git on OSX. I’ve been using it for about 9 months now. I liked it so much when I first began using it that I immediately added the ability to perform remote pushes to Unfuddle.
I was pushing some commits earlier this morning and realized that I never made the changes to GitX public. It was always my goal to share the updates with the community but I always kept getting sidetracked. Well, today I forked the master project and even added GitHub integration.
You’ll need the latest version of Xcode to compile from source. If you just want access to the customized application, you can download a ZIP of the forked project and you’ll find the application in /path/to/download/build/Debug/GitX.app. Hope others find this as useful as I have…

Overlaying the Flex SDK with the AIR 2.0 SDK on OSX
Dec 4th
Since I develop with multiple IDEs, I maintain the latest releases of the Flex and AIR SDKs in a centralized location outside of their default install locations. This made enabling the AIR 2.0 SDK simple for me as all I had to do was the following:
1. Duplicate my Flex 3 SDK path
2. Rename the duplicate to flex_sdk_3.x_air_sdk_2.x
3. Download the latest AIR 2.0 SDK (currently AIR20_mac_sdk_120209.tbz2)
4. Place the AIR SDK zip in the root of the new Flex SDK directory
/flex_sdk_3.x_air_sdk_2.x/AIR20_mac_sdk_120209.tbz2
5. Open up Terminal in the new Flex SDK directory and execute the following command:
tar -xjf AIR20_mac_sdk_120209.tbz2
6. Open Flex Builder and add the new SDK -> Flex Builder > Preferences > Installed Flex SDKs > Add
Now, when I want to create an AIR app that targets the 2.0 SDK all I have to do is
1. Update the project compiler settings to use the new SDK -> Project > Properties > Flex Compiler > Use a Specific SDK
2. Update the application descriptor file to use the AIR 2.0 namespace
<application xmlns="http://ns.adobe.com/air/application/2.0beta">
All of the above steps can be repeated for the Flex 4 SDK as well.
For those interested, these are the items that were updated and added to the SDK for 2.0:
/bin/adl
/bin/adt
/frameworks/libs/air
/frameworks/projects/air
/lib/nai
/lib/adt.jar
/runtimes/air
/samples
/templates/air
/AIR SDK Readme.txt
/SDK license.pdf
CAVEATS:
- There’s a new certificate process started in AIR 1.5.3 that may disrupt your workflow if you’re creating signed applications.
- If you want to utilize the new native process features, you’ll have to implement multi-platform builds (native installers for Win, Mac and Linux) and these must occur on the target platform (ie, can only create DMGs on Mac, etc)
Working with MySQL Doesn’t Have to Suck
Nov 25th
That’s the tag line for Querious, an awesome MySQL database management tool from Araelium Group. It’s like MySQL Administrator combined with Sequel Pro.
Prior to Querious, I would have to use both of those other apps plus some CLI to manage all the data systems I’m responsible for. Now, with Querious I can use one GUI and resort to the CLI only when absolutely necessary. It has a lightweight feel like Sequel Pro plus you get the full administrative capabilities of MySQL Administrator + phpMyAdmin. If you have to import a massive SQL dump, either split it up or prepare for the app to crash (unless you modify max_allowed_packet).
All in all, Querious is a must-have for MySQL DBAs that work exclusively on a Mac and is definitely worth the $25 price tag…
Installing New Snow Leopard Server
Nov 21st
During a super busy week this week the main server on the internal network died. This was bad, really bad. As the Open Directory Master, this machine was responsible for everyone being able to enjoy a smooth workflow. Promoting another server to OD Master just wasn’t an option as there were other critical services running on the now deceased machine. No, for this catastrophe we had to invest in something that we could expect to be more reliable under the constant strain.
Pre-Installation
Surprisingly, the New Mac Mini Server from Apple couldn’t have been released at a better time. With a little under 12 hours until the next day of business, we would have to acquire a server, setup and restore the system data from our latest backup. Based on those requirements, I knew that only one box could rise to the occasion.
So, after receiving purchase approval, I made my way to the nearest Apple Store to snag one of those precious jewels. I knew things would work out too when I made it to Santa Monica and lucked up on a parking space about 40 feet from the Apple Store entrance.
Once in the store, I didn’t waste anytime. I needed to get my server and split. Of course I ended up browsing and didn’t leave until about 20 minutes later. But, I had our new server in hand ready to be welcomed into the fold.
Once I made it back to the office around 9pm, I had to prepare the rack for a new family member. Finally, we could have all of our servers consolidated in 1 area instead of scattered around thanks to the form factor of the Mac Mini. It really takes up very minimal real estate and makes me wonder if I’ll ever deploy Xserve now that the Mini is a viable option. The cost-to-value ratio here is excellent. I mean you get a terabyte server with 4GB of RAM and an unlimited client license to Snow Leopard Server for around $1200 (including Apple Care). To do the same with a new Xserve could easily set you back $3000+. It might not work for a video shop but at these prices it’s a no brainer for powering an expanding network.
Anyways, it’s now time to put this puppy into action. So I roll up my sleeves and get to crackin’.
The Arrival
The box that it comes in adds an additional 1/3 to the dimensions. So you know the footprint on this bad boy is going to be small.
Installation Preparation
After inspecting the package contents, it was time to get to work. About 9 hours later, the new machine was installed into its new home ready to provide core and directory services to the team with overall workflow only slightly bruised…:D
Home, Sweet Home!
Using the Flex IViewCursor to Manage an ArrayCollection
Nov 12th
One of the nice things about the Flex framework is the various utility classes that make it so much easier for you to accomplish your development tasks than you’d be able to without them. One such class, in my opinion, is mx.collections.IViewCursor. What this class does is to define an interface for enumerating a collection view (ie, ArrayCollection) both forwards and backwards. Using this construct, you can avoid having to use for.. loops to examine the collection.
Here’s a quick example of a fictitious auto maker that’s tasked us to update some info related to one of its auto dealers after receiving the quarterly sales report:
var carDealers:ArrayCollection; var dealerCursor:IViewCursor; var vehicleCursor:IViewCursor; var affectedDealer:CarDealer; var targetVehicle:Car; var targetVehicleIndex:Number; var dealerIdFromSale:String = 'XXXXXXXX-XXXX-XXXX-XXXXXXXXXXX'; var vinNumberFromSale:String = 'XXXXXXXXXXXXXXXXX'; dealerCursor = carDealers.createCursor(); // iterate through the list of dealers while (!dealerCursor.afterLast) { if (dealerCursor.current.dealerId == dealerIdFromSale) { affectedDealer = CarDealer( dealerCursor.current ); // create a cursor to iterate over the dealer's inventory vehicleCursor = affectedDealer.inventory.createCursor(); // iterate over the inventory while (!vehicleCursor.afterLast) { if (vehicleCursor.current.VIN == vinNumberFromSale) { // a match was found so now we need the // index of this vehicle in the ArrayCollection targetVehicle = Car( vehicleCursor.current ); targetVehicleIndex = affectedDealer.inventory.getItemIndex( targetVehicle ); // since the sale was successful, we can safely // remove the vehicle from this dealer's inventory affectedDealer.inventory.removeItemAt( targetVehicleIndex ); } vehicleCursor.moveNext(); } } dealerCursor.moveNext(); }
In a few lines of code, we’re able to create some very readable and manageable logic to complete the task of updating the inventory. And, you may notice that we also iterated over not one, but two ArrayCollection instances with our mighty IViewCursor. One additional thing to note is the use of the moveNext() method. It’s important that you instruct the cursor that it’s OK to advance even though you’ve found what you’re looking for; otherwise, plan on some serious hang time. I mean it is still a while..loop after all!
To open aum.flexbuilder.osx, you need to install Rosetta
Oct 22nd

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.
The application Finder cannot be opened -10810
Oct 14th
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…:D




