Japanese name for FileMaker
Japanese name for FileMaker
- Subject: Japanese name for FileMaker
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 27 Mar 2003 12:45:36 -0500
My Japanese localizer has a problem with FileMaker Pro's file name. I wonder
if anybody is aware of any unusual problems with FileMaker Pro's file name
in Japanese.
Here's a summary of the behavior we're seeing. Basically, we put the display
names of all running applications in a pop-up menu. Then when the user
chooses one of them, we match the display names of all running applications
with the name selected in the pop-up until we find the match, and extract
its path for use in the rest of our application. This works fine, except
when the user chooses FileMaker Pro. In that case, nothing happens.
We populate the pop-up menu with the display names of every running
application by using NSWorkspace's -launchedApplications method to get an
array of dictionaries for all running applications, then loop through the
array extracting the path of each using the NSApplicationPath key. In the
loop, we use NSFileManager's -displayNameAtPath: to get the display names to
put in the pop-up menu.
Oddly, this gives us the display name of FileMaker Pro with the "FileMaker"
part in Japanese characters, while the "Pro" part appears in MacRoman. I
can't see anything in my code that would account for this, so I assume it's
just the way FileMaker, Inc. chose to name the application for Japan. Does
anybody know if this is correct? My localizer tells me that this name is the
same as the name of FileMaker Pro that appears in the Open File Panel (which
is an alternate way we provide to open applications, which works perfectly
well in our application).
When the user chooses FileMaker Pro from the same pop-up menu, we follow the
same technique for finding its path and getting its display name, to compare
with the display names in the pop-up menu. We get the launchedApplications
dictionary from NSWorkspace, then enter a loop where we get the paths and
the display names, until we find a display name that matches the display
name in the pop-up menu. Then we pass the chosen path out to the rest of our
application.
Only we apparently never find it in the case of FileMaker Pro, and our app
doesn't work in that case.
Here's our code for populating the pop-up menu:
enumerator = [[[NSWorkspace sharedWorkspace]
launchedApplications] objectEnumerator];
id applicationDictionary;
while (applicationDictionary = [enumerator nextObject]) {
[applicationNames addObject:[[NSFileManager defaultManager]
displayNameAtPath:[applicationDictionary
objectForKey:@"NSApplicationPath"]]];
}
And here's our code for finding the item chosen from the pop-up menu:
enumerator = [[[NSWorkspace sharedWorkspace]
launchedApplications] objectEnumerator];
id applicationDictionary;
while (applicationDictionary = [enumerator nextObject]) {
if ([[[NSFileManager defaultManager] displayNameAtPath:
[applicationDictionary objectForKey:@"NSApplicationPath"]]
isEqualToString:selectedTitle]) {
break;
}
}
All of the other running applications that appear in the pop-up menu work
correctly.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.