When the file arrives, verify that the contents of it have also arrived. It's 
possible you may just be processing that a file was created but nothing yet has 
been put into it.
--
Gary L. Wade (Sent from my iPad)
http://www.garywade.com/

> On Jul 26, 2015, at 2:28 PM, Robert Martin <robmar...@frontiernet.net> wrote:
> 
> I’m having some issues. I’m tracking a folder that is I watch via kqueue, and 
> if a .plist arrives, I process it immediately. The plist contains a 
> dictionary, which is successfully read with dictionaryWithContentsOfFile:. If 
> I log the dictionary description, it is accurate. The dictionary only 
> contains strings, arrays of string, NSNumbers, or NSDates.
> 
> Though I can guarantee that the plist is well formed when it’s sent, if I try 
> to serialize it with:
> 
> NSData* plist = [NSPropertyListSerialization 
> dataWithPropertyList:updateDictionary];
> 
> I get a null, and an error (200) that the plist contains null.
> 
> Before I make that call, I put in a check for nulls, but none are found:
> 
>    [updateDictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL 
> *stop) {
>        
>        if( obj == nil ){
>            *stop = YES;
>            NSLog( @"nil obj for key: %@", key );
>        }
>        
>        *stop =  NO;
>    }];
> 
> I cannot understand how a dictionary which contains no nulls and only valid 
> classes can generate the NSPropertyListSerialization error. Any ideas?
> 
> Rob

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to