I just dont know enough about Windows but need to compile a desktop project created on a Mac for it now.
So far, I got everything running under Parallels, but the apps main window is intended to accept a file drop from XFDF files (thats XML type files for Adobe Acrobat, in this case containing the fields and value from a PDF form).
This works fine on a Mac in the open event of a canvas on the window:
dim fdftype as new filetype
fdftype.Extensions="fdf;xfdf"
me.AcceptFileDrop(fdftype)
But on Windows (XP) the file icon turns to a “not permitted” sign when I try to drop it. Guess I have to extend the definition but how?
I put that value under fdftype.maccreator, but no change under Windows. I can open a file via folderitem.dlg.showmodal, but not drop it onto the canvas. But thanks anyway!
I quickly tried code I use on Mac under Windows, and it is very disappointing : No object dropped over a groupbox is ever accepted, no matter the file type in AcceptFileDrop There must be something should know ; apps such as Paint. Net do accept file drop
Same here. Everythings fine under Mac OS, but Windows dont care if I define the filetype in a window- or app-property (and accept.filedrop in the open event of a canvas of course).
I would rather guess that I have a wrong idea of file types and how to set them. On the other hand, I followed most what I could find in this forum and it still doesnt work for my Windows installation.
[quote=77941:@Norman Palardy]Then I place me.AcceptFileDrop("Any")
“ANY” is not the name of the item in the file type set
Its JUST a string (which should match an extension I believe)
Filestypes.Any is the object name[/quote]
Documentation for AcceptFileDrop is not quite explanatory enough which only states RectControl.AcceptFileDrop ( FileType as String ) . From that, it is not easy to guess RectControl.AcceptFileDrop ( FileTypes.Any ) is what should be entered.
Well. There are more mysteries in Xojo than my philosophy can fathem
I just tested this and it is because you are missing a semi-colon. RectControl.AcceptFileDrop("special/any;") worked for me.
Sadly the docs leave out the semi-colon so I am unsure whether the documentation or the semi-colon is the real bug in this case. Personally I prefer to define the object and use that where needed.
[quote=77946:@Bob Coleman]I just tested this and it is because you are missing a semi-colon. RectControl.AcceptFileDrop("special/any;") worked for me.
Sadly the docs leave out the semi-colon so I am unsure whether the documentation or the semi-colon is the real bug in this case. Personally I prefer to define the object and use that where needed.[/quote]
This exchange is exactly why this forum is an irreplaceable resource : you provided me with a precious undocumented detail I would have never been able to try.
Sorry, but its still not working for me. Under Mac OS yes, but still not under Windows.
Could you please explain more verbose or post a complete code sample of a window (container) that accepts every file (or et least XFDF) under windows? I dont get it where my code differ from what you all have written here.
And again: Thanks a lot to all of you. Yes, it is amazing hot often and fast this forum comes up with a solution.
Yeeees! Thanks a lot, Michel!
As it seems the filetypes settings are really not clear to me yet. I had entered the file type manually in the wrong column, had not seen there was a dropdown that fills everything correctly.
What relieve!