On one if my projects we’ve started using best_in_place, which is a gem that allows you to edit elements of your data model ‘in place’ (aka directly on that page) in a restful way. However there wasn’t an option to change images using the same technique.
I created a fork of best_in_place and plugged in a jQuery component that I create that provides this very option.
You can use this standalone – or you can try out the forked best_in_place
Here’s a little login component I’ve extracted out of my pet project. I found that I kept on needing this for different apps, so thought a reusable component would be handy.
I was doing a bit of Jira story creation today and had a lot of stories to add. They were all written into a spreadsheet. So I wondered if I could do a batch import of the spreadsheet. This is possible if you have a Jira administrator account, but I don’t I’m just a regular Joey for this Jira server.
So I put together a little webservice client that does the csv import for me.
The project is an executable jar so you run it like so:
java -jar simple-jira-webservice-client-0.1-jar-with-dependencies.jar ${username} ${password} ${path_to_csv_file}
where the csv file might look like:
#project_key,summary,description MYPROJECT,New Story,Here is the description MYPROJECT,New Story Two,Here is another description
If you’d like to use it, you’ll need to run a few maven commands (see github for more info) first to get the wsdl for your jira server. Once that set up you can then build it, and then run the above command.
I was helping a friend build her site and she wanted a simple gallery mechanism. There are a ton of great gallery javascript plugins, but they were overkill for what she wanted, so I built a real simple one.
Its written in coffeescript. It may be useful to someone else.
The source code is here
I was on a training course the other week and for part of it we had to build a timeline component. We originally build it in javascript using canvas tags. I’ve now converted it into a coffeescript. Its a bit rough and ready but may be of use to others.

I find it useful to clear out old unused classes from a flex project from time to time.
A few years back I wrote an Air app to do this. It had a UI and guided you through the process. I pulled it out there recently and while it still works, I thought it would be easier to have a ruby gem to do the same work and with less code.
The mechanism is the same. You specify the path to the source folder you wish to inspect and a set of link report xml files. It’ll then look through all the declarations in the link reports and see if they are within the source folder. This will give it a list of all the classes that are in use. Using this its easy to derive the list of unused classes. The gem will print out a list of unused classes, the air app will list them in the ui.
The gem usage is like so:
gem install flex-source-inspector flex-source-inspector inspect path_to_src path_to_link_report
github repo is here
The air app repo is here.
Here’s a little lib I cooked up for my current project. We often had to send out ui changes for quick feedback. These were large forms so I thought it would be useful to be able to take a snapshot of the complete form. There are desktop tools that do this, but they can’t scroll a large flex based form.
The lib combines the ability to take images, with the [Mixin] metadata tag (as used by Xavi).
The code is on Github.
It looks like this:


Enjoy.
I’m currently doing a lot of flex applications for LiveCycle. One task that one had to perform repeatedly was copying your latest swf to the LiveCycle process so that you can preview it in the workspace. This is a bit of a drag, so I found some docs on how to deploy assets programmatically. I’ve tweaked the script so that it can be run as a command line tool. like so:
java -jar lces-asset-deployer.jar config.yml
I now run this tool from within eclipse when I compile my flex application and it automagically goes up to the server. The code for the script is on Github. For licensing reasons I can’t supply the libs but you’ll have everything you need if you have Livecycle installed, except for snake yaml which is here.
Just found a bug with text selection and IFocusManagerComponent. Bit of a head scratcher to find but here’s the link:
Note: This is not an issue with the Spark TabBar.
I’ve raised a defect for this here:
https://bugs.adobe.com/jira/browse/SDK-30915
The following code throws an RTE in Flex SDK 4.5.1
<?xml version="1.0" encoding="utf-8"?>
<s:Application
creationComplete="onCreationComplete(event)"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:local="*">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.events.FlexEvent;
[Bindable]
private var myDataProvider:ArrayCollection;
protected function onCreationComplete(event:FlexEvent):void
{
myDataProvider = new ArrayCollection([ 'Alabama', 'Arkansas', 'Antrim' ]);
}
]]>
</fx:Script>
<mx:TabBar
dataProvider="{myDataProvider}"
selectedIndex="0"/>
</s:Application>
Here’s a workaround:
package
{
import mx.controls.TabBar;
public class SelectedIndexTabBar extends TabBar
{
private var pendingSelectedIndex:int = -1;
private var highlightPending:Boolean;
override public function set selectedIndex(value:int):void
{
//prevent the default selected index setter
//as it throws an RTE if there are not children set.
if (numChildren == 0)
{
pendingSelectedIndex = value;
return;
}
super.selectedIndex = value;
}
override public function set dataProvider(value:Object):void
{
super.dataProvider = value;
if (value != null && pendingSelectedIndex != -1)
{
highlightPending = true;
}
}
override protected function commitProperties():void
{
super.commitProperties();
if (highlightPending)
{
highlightPending = false;
hiliteSelectedNavItem(pendingSelectedIndex);
super.selectedIndex = pendingSelectedIndex;
}
}
}
}
Use this class instead of the TabBar and your good to go.
