Re: Two questions
Re: Two questions
- Subject: Re: Two questions
- From: Aki Inoue <email@hidden>
- Date: Fri, 1 Jun 2001 13:59:09 -0700
Based upon this, I'm a little confused about what I should do. Should I
simply call it like this
status = FSPathMakeRef([fileName fileSystemRepresentation], &pathRef,
&IsDirectory);
Yes, this is what you want.
Aki
On 2001.06.01, at 09:51, Joe Muscara wrote:
FIrst of all, I want to thank you for your helpful responses.
On Monday, May 28, 2001, at 03:29 AM, Aki Inoue wrote:
status = FSPathMakeRef([fileName cString],&pathRef,&IsDirectory);
Unfortunately, this is incorrect. It won't work with any high-bit
characters & could raise exception in certain cases.
FSPathMakeRef (& all BSD API) in Mac OS X takes filenames in
decomposed UTF-8.
In order to get filenames from NSString, you can use -[NSString
filesystemRepresentation] method.
In fact, Apple's suggesting to avoid the usage of -cString API as much
as possible to make your application Unicode-savy.
-cString API could make your application limited to single script.
Based upon this, I'm a little confused about what I should do. Should I
simply call it like this
status = FSPathMakeRef([fileName fileSystemRepresentation], &pathRef,
&IsDirectory);
or is there something else I'm missing? The documentation for
-fileSystemRepresentation wasn't clear to me. Implementing it as I have
above does seem to work.
For overriding the click-through behavior, you can override
-(BOOL)acceptsFirstMouse:(NSEvent *)theEvent; method in your control.
The default implementation of this method is designed to match the HIG.
If the HIG says that my app should respond to click-throughs when they
are "non-destructive," then that's what I will do. I'll dig into the
HIG to learn more.
Thanks!
Joe