Aperture Plugin: Creating The Example File Name

cocoasmall
There are several parameters that depend on the settings for the random string format, the alpha case, and the length. I concentrate all the decisions for these into one big ugly switch statement that starts off like this:
rwok127
This sets a character set for generating the random string, and also an example string that I will use on the display. Displaying the example random string now consists of this:

rwok128
I truncate the example random part by the selected string length. Anywhere that the random string parameters change, I add a call to recalculate the parameters, such as in the action code for selecting the length:
rwok129
Now the dialog looks like this:
rwok130
The example file name now follows the settings.

The other parts of this series can be found via the Cocoa page.
The Bagelturf site welcomes Donations of any size