Re: NSWorkspace translation versus finder
Re: NSWorkspace translation versus finder
- Subject: Re: NSWorkspace translation versus finder
- From: John Stiles <email@hidden>
- Date: Wed, 22 Nov 2006 11:23:56 -0800
On Nov 22, 2006, at 11:17 AM, René van Amerongen wrote:
Op 22-nov-2006, om 19:07 heeft John Stiles het volgende geschreven:
On Nov 22, 2006, at 9:06 AM, René van Amerongen wrote:
Op 22-nov-2006, om 17:20 heeft Sean McBride het volgende geschreven:
On 2006-11-22 09:11, Rosyna said:
He's talking about the word "copy" in duplicating a file. When you
duplicate a file, it doesn't have a fake name.
Ahh, that's what he meant, I didn't find his post clear. I
though he
was talking about copying items that had fake names, like
duplicating a
folder with a .localized. In that case René, I think you've
found a
bug. You might look at using a Carbon API, posix API, or
something from
MoreFileX for a workaround.
I did looking into this before, but I will check again.
Its difficult to correct this by just code because I dont know
what word ( copy, kopy, copia, ) the right one should be when I
will duplicate the file with self created code. I can't use the
'copy' menu item name, because in some languages they are different.
What is the best way to get all those finder 'copy' words used by
the system and finder? Where are those?
Otherwise, I think I have to go for using applescript and let the
finder handle it.
I think your best bet is to create an AppleEvent to tell the
Finder to do it.
This does open up another can of worms—the user will now see the
copy dialog and could theoretically cancel the copy if they were
so inclined.
Your right about the can with worms. Copy dialog, FilePath and
spaces. Without spaces and small files it works perfectly.
Also when I have to act as Admin or root, the user have also to
supply two times an admin passw. One time for cocoa actions on the
file-system and one time for Applescript.
Copy dialog, canceling, I did try something with 'ignoring
application responses', try to find the copy window and hide it,
but both didn't help either. BTW it looks like if applescript
copying takes more time to start then using the finder directly.
I guess this is moving away from the cocoa forum now, but if
someone have a perfect idea, please mail me private.
I said "AppleEvent," not "AppleScript." It's not the same :)
AppleScript is built on AppleEvents. It attempts to provide a simple
scripting language, but it's limited in lots of ways and there are a
lot of edge cases that you're running into.
AppleEvents take a long time to figure out because they're much lower-
level. But it gives you a lot more control, and a lot of issues
you're seeing now—e.g. paths with spaces, quotes, Kanji in them—are
non-issues.
To stay in cocoa and my still standing question : What is the best
way to get all those finder 'copy' words used by the system and
finder? Where are those?
Hidden inside the Finder somewhere, probably. There wouldn't be a
good way to get at those without just doing it the hard way (try it
for each locale, keep a list inside your app).
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins (at) lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden