[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

metadata query - help needed



Am 05.03.2004 um 00:05 schrieb Jens Ropers:

>>> (Yes, the per-file open-with preference is actually stored in the 
>>> resource fork, for some weird and wonderful reason.
>>
>> Who did you tell that? It's wrong.
>
> You're right: It's wrong. It's SO WRONG to store the file-specific 
> "Open-with information" in a resource fork. ;-)

OK, so it's some new and not so often seen feature. Didn't know that 
yet. IIRC, OS 9 Finder had some similar mechanism which just changed 
the creator of the file. Or was this the reason why everybody had 
ResEdit installed?

> Sadly, you're also wrong, because that is exactly what Apple does.

These Finder hackers drive us nuts ;-)

<rant>
Honestly, they try to be innovative but forget they are working on the 
most centralized app in Mac OS. This app should be

1) reliable

2) stable

3) bug-free (as far as any possible)

4) easy to use

5) simple

Everything else should go into some helper app. With Sherlock, e.g., 
they did right.

Instead, it's still the app with the most obvious bugs.
</rant>



> Don't forget that the system will also heed/take into account any 
> file-specific "Open-with" information (if present) and such will have 
> priority over both extension, and type/creator info.
> Preserving the file-specific Open-with info right through packaging 
> and deployment is what this entire issue is about (at least as far as 
> I'm concerned and as far as my mails went).

I'm afraid, you can't. As this file specific resource stores the 
absolute path, you whould rely on having your app installed at some 
specific place. A big step back.



> DigitalGoddess:~/Desktop ropers$ cat test
> #!/bin/sh
>
> echo "Hello world!"
>
> exit 0
> DigitalGoddess:~/Desktop ropers$ chmod 755 test

Well, it's not a good idea on any UNIX to name a test script "test" 
since "test" is a shell-builtin command already and there is /bin/test 
as well, along with a man page. Common pitfall, however.


> In Finder, try double-clicking the test shell-script you just created.

Well, I named my test script "bla", did a "open ." and whoops - the 
Finder shows my script as a empty folder(!)[1]

So, there's no double click - previous Finders whould have opened a new 
window -, no "open with ..." in the context menu. Only way to procees 
is from the command line.

Next bug in short:
Nobile:~$ open bla
2004-03-05 19:10:25.015 open[3879] LSOpenFromURLSpec() returned -10814 
for application (null) path /Volumes/Party/Users/mah/bla.
2004-03-05 19:10:25.019 open[3879] Couldn't open file: 
/Volumes/Party/Users/mah/bla


Yet, another one:

Nobile:~$ open -a Terminal.app bla

Hey, the last one worked. So there is at least one way to open a test 
script in a GUI.


It's obvious why I usually ahve more terminal than Finder windows 
opened?


>> If this doesn't help, write a small AppleScript.
>
> <blush><clearsthroat>
> 	Ok. This is the point where I have to admit that I never wrote a 
> single line of Apple Script. Any good primers, like for the 
> non-braindead?
> </clearsthroat></blush>

AppleScript is the only programming language my mind refuses to 
understand. I tried more than once already. There are lots of example 
scripts on your platter, however.



> I do honestly believe that this email contains a fair few info 
> snippets that others might have missed, no matter how much more 
> technical they are.

So let them know.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/


[1] For those investigating the bug: "bla" is my usual name for 
temporary stuff. Most probably, I had a folder "bla" recently, viewed 
it in Finder and removed it from the command line. Finder obviously 
doesn't notice such changes.