Am 2008-11-29 um 19:06 schrieb Ed Leafe: >> I'd like to make my dabo application a drop target for files i.e. >> 1. DnD on the icon >> 2. DnD on the main window > > The main window is simple enough: set the window's DroppedFileHandler > property to the object that will handle the dropped files, and write > your code in that object's processDroppedFiles() method. That method > will receive a list of the files that have been dropped. The dImage > script in DaboDemo has a good example of handling dropped files.
Thank you! I'll try that. > For the icon I'm not exactly sure what you'll need. If you create > an .app file using py2app, files dropped on the icon will be passed as > arguments to the main script of your app. I'm not sure what will > happen with files dropped on an app's icon when the app is already > running, as I've never tried it. The argv_emulation could work ok (at the moment I get errors because the App object isn't initialized at start time, but I'll manage that). For DnD on the icon I need to implement MacOpenFile within wx.App, as I wrote; wx's event loop (or whatever) cares for the OpenFile apple event. I tried monkey patching wx.App via uiApp, but I run into the same problem as John: uiApp should be wx.App, but isn't, at least not while afterInit runs. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]