Oh, you're right. Guess I was confused with -[NSString pathExtension].
Christiaan
On 5/15/07, Adam R. Maxwell <[EMAIL PROTECTED]> wrote:
On Tuesday, May 15, 2007, at 08:57AM, "Christiaan Hofman" <
[EMAIL PROTECTED]> wrote:
>Because, according to the docs, it returns the empty string when
>there is no extension.
What returns the empty string? objectForKey:extension? Even so, the way
to check for the empty string is [@"" isEqualToString:], not the length.
adam
>
>On 15 May 2007, at 5:33 PM, Adam R. Maxwell wrote:
>
>> Why check -length on the return value from a dictionary? Won't it
>> just be nil? I know that [nil length] == 0, but I have this deeply
>> ingrained resistance to ever checking -[NSString length] :).
>>
>> NSString *bundleID = [defaultViewers objectForKey:extension];
>> if ([bundleID length])
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>Bibdesk-develop mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bibdesk-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop