Requestfile

Archives Forums/MacOS X Discussion/Requestfile

MacSven(Posted 2008) [#1]
I use this source in my application:

Function loadatoolbar()
	filter$="Image Files:png,bmp"
	file$=RequestFile("Select Iconstripe file",filter$,False )
	Print file$
EndFunction
but then i select a .png file i get this error.

CFPropertyListCreateFromXMLData(): plist parse failed; the data is not proper UTF-8. The file name for this data could be:
/System/Library/Frameworks/AppKit.framework/Resources/English.lproj/NSNavView.nib/keyedobjects.nib
The parser will retry as in 10.2, but the problem should be corrected in the plist.



Jesse(Posted 2008) [#2]
I tried it like below and get no errors
SuperStrict 
loadatoolbar

Function loadatoolbar()
	Local filter$="Image Files:png,bmp"
	Local file$=RequestFile("Select Iconstripe file",filter$,False )
	Print file$
EndFunction



Are you using framewor? If so, are you importing "BRL.system"?


plash(Posted 2008) [#3]
What is "CFPropertyListCreateFromXMLData()" from?

I don't think there is anything wrong with that code, are you sure thats the culprit?


MacSven(Posted 2008) [#4]
I am using the SVN from the maxgui (macgui.drivers).
Anyone too?


Dreamora(Posted 2008) [#5]
Then post it in the maxgui thread as this is not the current official and stable maxgui version.
the current stable and official is the one you get through syncmods. the svn one is a "beta build" only and has its own thread in the maxgui board.


SebHoll(Posted 2008) [#6]
Nope - the RequestFile() function is from BRL.System and is unaffected by the MaxGUI modules - the article is quite rightly placed here (unless it is Linux, but that's a different story).

MacSven: Does it happen every time you use RequestFile() or only sometimes. Can you post a complete, fully working example that reproduces the bug every time? Finally, is this on PPC or Intel Tiger?


MacSven(Posted 2008) [#7]
I used the sample from BlitzMax. I get the error exactly after i chose different kind of png and bmp files. I build it in debug mode. Than i select first a png picture , and secound i selected a bmp file. i find out that the error is in all programs i have wirtten exact the same problem. I am using a Intel Mac with MacOS X 10.4.11.


Brucey(Posted 2008) [#8]
Apparently, it's not an error, just a warning.

The plist file it is attempting to read is possibly corrupt in some way. The warning also displays the file that it thinks is causing the problem.
The reason no-one else would be having the same issue is that they are unlikely to have the same file corrupt.

It's nothing to do with BlitzMax specifically, you just happen to be running an application in which stderr is showing on the console.
I would expect, that if you built an XCode project with a file-requester in a similar way, and ran it from the console, you'd likely get the same warning.


MacSven(Posted 2008) [#9]
Is it possible to supress this warning?