On Jan 26, 4:37 pm, "Edward K. Ream" <[email protected]> wrote: > On Mon, Jan 26, 2009 at 3:21 PM, Ville M. Vainio <[email protected]> wrote:
> The short form is: there is lots of energy in the project for me now--not > because I'm ever going to use it, but for other reasons, somewhat difficult > to explain. I'm done for this evening with the wx gui. In some ways, this evening's work has been well worthwhile, but I am beginning to get the old bad vibes. On the plus side: - Added better error and tracing features to baseNativeTreeWidget class. - Made the baseNativeTreeWidget class more platform-dependent. - Added several methods to the wxLeoTree class that make the code clearer and cleaner. On the minus side: - wxTreeCtrl tree items can (and obviously do) move in memory between redraws. This is amazing. This means that item2vnode can not be a static Python dict. There is an easy workaround. Put the vnode in the wx tree item, using w.SetItemData and override item2vnode so it calls w.GetItemData. This shows how flexible baseNativeTreeWidget is. This alone justifies today's work. - I am beginning to remember the difficulties with wx events. There are too many of them. Events are triggered programmatically, rather than as a result of user actions. This causes no end of grief. Perhaps there is a clever way around these difficulties, but I don't have the stomach even to try. Post Mortem The wx gui plugin benefits hugely from the qt gui work, as now embodied in the baseNativeTreeWidget class. Most importantly, item2position allows the wx gui to avoid saving positions in item data. Saving vnodes is infinitely safer than saving positions. So it appears that from the "data side" the wx gui plugin can be made bullet proof. Alas, the "event side" dooms the wx plugin. So it's probably time to kill the wx plugin forever. I'll decide tomorrow. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
