Drag Accept files on Mac

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
xaxero
Knows some wx things
Knows some wx things
Posts: 33
Joined: Mon Apr 25, 2005 12:20 pm

Drag Accept files on Mac

Post by xaxero » Mon Jul 25, 2005 6:48 pm

wxMax OSX Tiger Xcode 2.1

Hi

I am trying to get file drop functionality similar to windows. In windows I drop a file on the window or the shortcut icon and my app opens the file.

Struggling to get similar functionality on the Mac. Looked through the wiki and got pointers to PLIST setup. Files types have registered to my app but the app refuses to accept the droped files. other apps like text editors etc accept the pathname.

Any ideas would be appreciated

Thanks

JS

User avatar
Ryan Norton
Moderator
Moderator
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Post by Ryan Norton » Wed Jul 27, 2005 5:45 am

I am unsure about this myself (asked on the list) - it may only work with certain controls... however you can override wxApp::MacOpenFile (see include/wx/mac/carbon) and when a user drags something over your app in the finder and it will work (ifdef it with __WXMAC__).

Anyway, Stefan the wxMac guy's response to me was
http://lists.wxwidgets.org/cgi-bin/ezml ... bgokhociln

EDIT: Basically what I mean is that is probably has something to do with the way you use wxDropTarget or a similar class... if you still have trouble maybe post the way you are using the class
[Mostly retired moderator, still check in to clean up some stuff]

Post Reply