Re: [dabo-users] Drag'n'drop on a dApp

2008-12-01 Thread Henning Hraban Ramm
Am 2008-11-30 um 18:02 schrieb Ed Leafe: Sorry, can't try at the moment, I'm on the run... ;-) Will try it probably on monday. Cool; no rush. Just let me know if it works for you. in uiApp def MacReopenApp(self, filename=None, *args, **kwargs):

Re: [dabo-users] Drag'n'drop on a dApp

2008-12-01 Thread Ed Leafe
On Dec 1, 2008, at 3:02 PM, Henning Hraban Ramm wrote: in uiApp def MacReopenApp(self, filename=None, *args, **kwargs): self.dApp.onUiReopenFile(filename, *args, **kwargs) must be: def MacReopenApp(self, filename=None, *args, **kwargs):

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-30 Thread Henning Hraban Ramm
Am 2008-11-30 um 01:13 schrieb Ed Leafe: OK, I did some reading on what MacOpenFile is, and it's a bound method of wx.App, so of course you can't simply assign it like that. What I'll have to do is write some code to pass the wx.App event to a dApp handler. This might take a few minutes,

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-30 Thread Ed Leafe
On Nov 30, 2008, at 9:47 AM, Henning Hraban Ramm wrote: I'd suggest to implement those four methods in dabo's wx-uiApp and provide a hook in dApp - probably in a unified way, that works also with Windows and GTK. (If Windows or GTK provide something similar at all.) Good suggestion

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-30 Thread Henning Hraban Ramm
Am 2008-11-30 um 16:55 schrieb Ed Leafe: I'd suggest to implement those four methods in dabo's wx-uiApp and provide a hook in dApp - probably in a unified way, that works also with Windows and GTK. (If Windows or GTK provide something similar at all.) Good suggestion - that's what I

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-30 Thread Ed Leafe
On Nov 30, 2008, at 10:01 AM, Henning Hraban Ramm wrote: Sorry, can't try at the moment, I'm on the run... ;-) Will try it probably on monday. Cool; no rush. Just let me know if it works for you. -- Ed Leafe ___ Post Messages to:

[dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Henning Hraban Ramm
Hi there, 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 For 1 I'd need to implement wx.App.MacOpenFile; but a dApp is no wx.App. Where must I stuff that method, or is there a better dabo way? For 2 I've no clue, any documentation

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Ed Leafe
On Nov 29, 2008, at 11:28 AM, Henning Hraban Ramm wrote: 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

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread johnf
On Saturday 29 November 2008 10:06:18 am Ed Leafe wrote: On Nov 29, 2008, at 11:28 AM, Henning Hraban Ramm wrote: 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

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Henning Hraban Ramm
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

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Ed Leafe
On Nov 29, 2008, at 12:28 PM, Henning Hraban Ramm wrote: 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

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Uwe Grauer
Ed Leafe wrote: On Nov 29, 2008, at 11:28 AM, Henning Hraban Ramm wrote: ... BTW the Google search in the wiki searches the whole domain dabodev.com, i.e. finds mostly svn entries. Use serchterm site:wiki.dabodev.com to you will get the wiki entries. Uwe

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Henning Hraban Ramm
Am 2008-11-29 um 19:39 schrieb Ed Leafe: 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

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Ed Leafe
On Nov 29, 2008, at 2:22 PM, Henning Hraban Ramm wrote: It doesn't work like I tried: class fieeApp(dabo.dApp): def afterInit(self): self.Application.uiApp.MacOpenFile = self.MacOpenFile def MacOpenFile(self, filename): dabo.infoLog.write(u'MacOpenFile: %s' % f)

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Ed Leafe
On Nov 29, 2008, at 3:12 PM, Ed Leafe wrote: There really is no hook for this point of the app creation code. I think it would be a good idea to add an afterSetup() hook method to dApp, which would be called after the UI has been initialized. Let me play with it a little bit, and I

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Paul McNett
Henning Hraban Ramm wrote: 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. If you ever need the wx.App instance directly, you can: import wx wxApp = wx.GetApp() Paul

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Paul McNett
Ed Leafe wrote: On Nov 29, 2008, at 3:12 PM, Ed Leafe wrote: There really is no hook for this point of the app creation code. I think it would be a good idea to add an afterSetup() hook method to dApp, which would be called after the UI has been initialized. Let me play with it a

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Henning Hraban Ramm
Am 2008-11-29 um 22:26 schrieb Ed Leafe: There really is no hook for this point of the app creation code. I think it would be a good idea to add an afterSetup() hook method to dApp, which would be called after the UI has been initialized. Let me play with it a little bit, and I should

Re: [dabo-users] Drag'n'drop on a dApp

2008-11-29 Thread Ed Leafe
On Nov 29, 2008, at 4:07 PM, Henning Hraban Ramm wrote: Thank you for your effort, but at least this method of my app doesn't work: def afterSetup(self): self.uiApp.MacOpenFile = self.MacOpenFile The method itself is called, but the monkey patch doesn't seem to have any