[futurebasic] Re: [FB] CFArrayOfCFDicts question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2010 : Group Archive : Group : All Groups

From: Steve <mactech@...>
Date: Thu, 28 Oct 2010 20:06:53 -0400
Robert,

How can one do this knowing the FSRef of the file in question?

thanks
Steve

On Oct 28, 2010, at 6:12 PM, Robert Purves wrote:

> 
> Steve wrote:
> 
>> In the example code CFArray of Dicts Proj it writes CFArrayOfCFDicts FILE to a folder CFArrayOfCFDicts FOLDER on the Desktop 
>> double-clicking this file opens up Property List Editor [ if installed ] and you can inspect the contents of the file
>> If the file CFArrayOfCFDicts FILE  becomes corrupted or is the wrong file type, the example code will crash.
>> How should I preflight the file type before opening it and possibly causing the crash?
> 
> The plutil command checks for syntax errors in a property list.
> 
> $ plutil /Users/rdp/Desktop/CFArrayOfCFDicts\ FOLDER/CFArrayOfCFDicts\ FILE 
> /Users/rdp/Desktop/CFArrayOfCFDicts FOLDER/CFArrayOfCFDicts FILE: OK
> 
> $ plutil /Users/rdp/Desktop/nonsense 
> /Users/rdp/Desktop/nonsense: Unexpected character i at line 1
> 
> Robert P.
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>