This post will be pre-writing for code-level documentation, including the Scripting Miscellany.
leoApp.py now contains the IdleTimeManager (ITM) class, with a singleton instance, g.app.idleTimeManager. This class handles all details of running code at idle time, including running 'idle' hooks. The new encapsulation has simplified code all over Leo: - ITM ivars replace several LeoApp ivars. - LM.load now calls g.app.idleTimeManager.start() to start idle-time processing, leaving all the details to the ITM class. - The g.idle time functions in leoGlobals.py now simply set g.app.idle_time_hooks_enabled. This is the only other remaining LeoApp ivar pertaining to idle-time processing. - To schedule code for running at idle time, code calls g.app.idleTimeManager.add_callback(callback). These are the kinds of simplification I live for. They put all related code in a separate class, where they belong. They make Leo's code easier to understand, even as the code continues to grow. That's why Leo remains maintainable after all these years. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
