// Look through the array of applications, and see if we need to add/remove any - configure the rest
NSMutableArray currentApplications = new NSMutableArray(aConfig.applicationArray());
if (applicationArray != null) {
for (Enumeration e = applicationArray.objectEnumerator(); e.hasMoreElements(); ) {
NSDictionary anApp = (NSDictionary) e.nextElement();
String name = (String) anApp.valueForKey("name");
MApplication anMApplication = aConfig.applicationWithName(name);
// if I can't find the application, I might be updating the name - in that case, look under the oldname.
if (anMApplication == null) {
name = (String) anApp.valueForKey("oldname");
anMApplication = aConfig.applicationWithName(name);