I've been trying to write a rather trivial program that prompts you for a filename (via NSOpenPanel) and produces HTML for a web site via parsing an XML document and adding tags, etc. I wrote the OpenPanel in about 30 seconds... and formatted my parser arguments after apples examples in the coreFoundations docs. Unfortunately It won't function because I can't seem to find the correct data type for one of the args. This is the declaration of the function in the XMLParse.h header file.
CFXMLParserCreateWithDataFromURL(CFAllocatorRef allocator, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFXMLParserCallBacks *callBacks, CFXMLParserContext *context);
it is the dataSource that is giving me trouble; using the requested data type I get these errors 1.) initialization from incompatible pointer type 2.) passing arg 2 of "CFXMLTreeCreateWithURL' from incompatible pointer type.
this is how i declared the variable (it gets it's value from a text field where the user can either type the path or get it from the open panel)
CFURLRef filePath = [path objectValue];
If I just pass the "filePath" var as a String it doesn't work and I get the second warning... when i click on the the button to parse the data i get this message in the run panel of PB.
Aug 09 12:38:46 Member to HTML *** -[NSConstantString _retainedScheme]: selector not recognized
what am I doing wrong??
sorry to make this such a long read,
thanks in advance,
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!