Archive for July, 2008

Delete an unused workspace from Flex Builder 3

Flex Builder 3 (ie Eclipse) keeps a running list of your most recently used workspaces and presents them when you select “Switch Workspace” If you’ve moved stuff around or were experimenting, you’re likely to have a few workspaces listed there that you don’t want. To my knowledge there’s no setting you can clear this list within Flex Builder. You have to edit a preferences file.

The only tricky part is that you need to be able to see the preference file, which may be hidden by default. Here’s some instructions to show hidden files for OSX and Windows.

The file that contains these settings could be found in a couple of places, but they are typically located in:

~/Documents/Flex Builder 3/configuration/.settings/org.eclipse.ui.ide.prefs

(~ referers to your user/home directory)

Open this file in any text editor and you’ll see a variable “RECENT_WORKSPACES” that has a list of the recent workspaces. Delete them all or customize to your liking.

Flex FlipCard Component

UPDATE: There is a more recent post about the FlipCard

FlipCard is a component for Flex 3 that allows you to put content on two sides of a 3D “card” and flip between the front and back.  The compiled library as well as full source code can be downloaded from the project page on google.com.

Click on the screenshot below for a demo:

FlipCard ScreenShot

Using the component is simple. Once you add flipcard.swc to your project, you can just drag the component into your Application from Design view, or hand-code the MXML yourself. The example shows how little code is needed to use it. The front and back of the flip card can be whatever UIControl you want them to be. In the example I use a VBox for the front and a Canvas for the back.  Additionally the look and feel is all defined with CSS which you can override to match your own application.

The 3D effects were written by tink.ws which utilizes PaperVision3d. At first glance this FlipCard may just seem like a stripped-down of tink’s “flip” example, but I think there’s a few cool differences.  Mainly the FlipCard is meant to be a familiar UI component in an application for showing settings, options, etc in a limited space.  Your users may have seen similar interfaces in mac and iPhone apps.  FlipCard is compiled and packaged into a component so you don’t have to grab PaperVision from SVN and piece all the sample code together.  FlipCard also uses some cool tricks to make it work like a native Flex component in that you add your front/back side by simply dragging two sub-components inside it – just as you would add sub-components to a VBox, Panel, etc.

I would be interested to see any application that you build using this component. Please feel free to post a link to your app, suggestions or modifications in the comments section.

Some of the purchased items on the iPhone could not be transferred…

iTunes Sync Error

If you purchase an application directly through your iPhone, you may get a warning similar to “Some of the purchased items on the iPhone could not be transferred…” when you try to sync with iTunes.

I was able to get rid of this warning by simply going to the iTunes store from within iTunes (not the iPhone) and then clicking the “Buy” button for each app. The app store remembers that you have already purchased the application and does not charge you, but it does download the app to your iTunes library. If you’re a little nervous about buying the same app twice, you’ll get this message instead of the purchase confirmation:

iTunes Confirmation Message

After downloading, you won’t get the error message the next time you sync. Not sure if that’s the correct way to deal with the it, but it seems to solve the problem

CLI has stopped working

CLI has stopped working” is an error that you may encounter when running command-line PHP scripts in Windows.  This has been reported frequently by CakePHP users when their “bake” scripts crash.  My particular experience with this issue occurred while running PHPUnit tests from the command line.

The top search result as well as others indicates that this is a problem with php_mysqli.dll however none of the suggestions on this page helped me.  An experts exchange post indicates that the problem is with libmysql.dll, however I didn’t know where to download the replacement for libmysql.dll.  It turns out that I already had it and the following solves the problem on My Vista and Windows 2003 boxes:

Copy From: C:\Program Files\MySQL Server 5.0\bin\libmySQL.dll

Paste To: C:\Program Files\PHP\ (overwrite the original)

This assumes you installed MySQL and PHP to their default locations.  If not, then use the correct paths for your particular setup.

Prior to this fix, my unit tests were causing the “CLI has stopped working” error at least 50% of the time.  Since replacing the dll file I haven’t seen the error.

Return top