I created a FileType with the extension used by my app and called it UltraSettingsFile. I created an OpenDocument event in the “App”. I was hoping when someone dropped an icon on the app or double clicked the associated file type it would then present a message box would appear with the path.
msgbox Item.NativePath
I defined a FileType with the desired file extension and set the app to accept file drops. It’s not triggering. What basic aspect am I missing?
This code doesn’t make sense.
Why not use the parameter you get from OpenDocument event?
[quote=“Matthew_Jacques, post:1, topic:55617”]
msgbox SettingsFile.NativePath
[/quote]
There is a debugger to do that…
And avoid the use of MsgBox to get valuable data at debug time. Instead, use DebugLog (read docs).
You’re right. It makes no sense at all. I’v always found FolderItem coding perplexing.
Read Chapter “Chapter 9: In And Out” from the book here:
You will find these examples in the zip archive:
Dialogs.xojo_binary_project
FileTypes.xojo_binary_project
OpenPic.xojo_binary_project
Streams.xojo_binary_project
StyledTextEditor.xojo_binary_project
TextOut.xojo_binary_project
TextRead-ListBox.xojo_binary_project
TextRead.xojo_binary_project
and also something strange: 3rd and 4th edition of the iOS addendum, and the awaited desktop version is missing.
Link to archive:
http://files.xojo.com/Documentation/IntroductionToProgramming/IntroductionToProgrammingWithXojo-PDF.zip
On your file type, did you mark it as incoming?
Even better, could you attach a screenshot of the file type definition?
I pinned it down. I didn’t realize I had to checkoff “accept file drops”
1 Like