[plt-dev] searching for bitmap% via f1 on mac os x

From: Thomas Chust (chust at web.de)
Date: Sat Feb 28 11:36:24 EST 2009

2009-02-28 Eli Barzilay <eli at barzilay.org>:
> On Feb 28, Thomas Chust wrote:
>> [...]
>> using LaunchServices, you would need exactly two C API calls: One to
>> create the URL object
>> [...]
> ???  On a very brief look, I need to read about and represent
> `CFURLRef', `CFAllocatorRef', `CFIndex', and `CFStringEncoding'.  IMO
> this is significantly more complex than "run an osascript command and
> plug the url here".
> [...]


all arguments to CFURLCreateWithBytes can be trivially filled in,
except for the character data of the URL and its integer length,
predefined constants can be used for all arguments. That some integer
and enumeration types have speaking names for clarity of the API can
hardly be held against it...

> [...]
>> [...] I was just
>> curious why the special OS API is used to open URLs on Windows but
>> not on MacOS X.
> That's easy: `shell-execute' on Windows is not one random function, it
> is a generic way to "start stuff", so it's part of mred.
> [...]

The same is true for the LaunchServices API.

Anyway, judging by the offended tone of the replies I got, I must have
inadvertently trodden on someone's foot with my question. This was
certainly not my intention. I didn't even want to start a big
discussion on that technical detail :-/


When C++ is your hammer, every problem looks like your thumb.

Posted on the dev mailing list.