RE: visualize/refactor message flow of a modular application
Steve Barnes <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <VI1PR03MB4479D7BF7FC4D1ED1B6E9B559BB40@VI1PR03MB4479.eurprd03.prod.outlook.com> |
Christian, One ‘trick’ that I have used for addressing this sort of issue comes from the realisation that, in python at least, events (even Windows events) can have additional information by simply adding it to the event and of course it doesn’t have to be used and as long as it is not excessive it has little impact on the performance. So if within your code you add to each event sending method something like: evt = wx.Event(……) # Create the event as you normally would evt.raised_from = (__file__, ‘a label’) # Sorry about the quotes (Outlook) # raise the event Then any event handler or debugging process can access and potentially print the originator information. Hope that this is helpful. Steve (Gadget) Barnes From: [email protected] <[email protected]> On Behalf Of Christian K Sent: 21 May 2020 17:12 To: wxPython-users <[email protected]> Subject: [wxPython-users] visualize/refactor message flow of a modular application In the process of over and over extending and enhancing an application (around 50 source files) I came to the point that I cannot anymore tell with precision where some messages came from and where they go to (both pubsub and wx.Events). So I thought it would be nice to have a tool to visualize the messaging structure. Do you know of such tool or do you have recommendations for an implementation maybe even without necesity of code inspection? Regards, Christian -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/a62f6e33-693a-4bbb-bdea-c69cc3cd3c4d%40googlegroups.com<https://groups.google.com/d/msgid/wxpython-users/a62f6e33-693a-4bbb-bdea-c69cc3cd3c4d%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/VI1PR03MB4479D7BF7FC4D1ED1B6E9B559BB40%40VI1PR03MB4479.eurprd03.prod.outlook.com.