Re: [Regexkit-discussion] CFPropertyList Error
Status: Beta
Brought to you by:
jengelhart
From: John E. <joh...@gm...> - 2008-03-06 22:24:26
|
On Mar 6, 2008, at 7:50 AM, Jonathan Dann wrote: > Hi All, > > I added a working regex to my app to search through a string, but > noticed that I was getting a log like this: > > CFPropertyListCreateFromXMLData(): Old-style plist parser: missing > semicolon in dictionary. > > This doesn't cause a crash but happens with any regex I try, even the > simplest test case below shows up this error: > > - (void)findMatches; > { > NSString *body = @"section section"; > NSString *regex = @"section"; > NSRange range = [body rangeOfRegex:regex]; > } > > I've added the #import <RegexKit/RegexKit.h> to my .pch file. > > Is this a known error? Or even a problem? It's a known problem that got past me when developing 0.6.0. The fix is trivial: The problem lies in the frameworks Resources/English.lproj/ Localizable.strings file. I would recommend opening the 'master' framework version (likely /Developer/Local/Frameworks/ RegexKit.framework/Versions/A/Resources/English.lproj/ Localizable.strings) with Xcode and use Xcodes find and replace in Regular Expression mode searching for the regex "$ (quote dollar- sign). Each line is required to end in a semi-colon, and this will find all the lines that end in just a quote, you'll need to add a ; semi-colon to those lines. As I recall, there's about three to four. Once fixed, you'll need to rebuild your app so that the fixed version is copied in to your apps bundle. That should clear up the problem for you. If it doesn't, another possibility is that you're running Safari AdBlock and running in to an oddity of how input managers work. You'll need to copy the fixed version of Localized.strings to /Library/ InputManagers/Safari\ AdBlock/Safari\ AdBlock.bundle/Contents/ Frameworks/RegexKit.framework/Versions/A/Resources/English.lproj/ Localizable.strings |