On Tue, Aug 27, 2019 at 7:13 AM vitalije <[email protected]> wrote:
GUI code depends on settings and can't be instantiated without settings but > some of the Leo reading code depends on GUI elements. That makes the > initialization code very hard to understand and maintain. It is a bit like > the question what comes before chicken or egg. > That's why Leo uses Apple's finishCreate pattern. It makes the chicken and egg problem explicit. At the beginning of this thread Edward wrote about his idea of introducing > global settings. The need for this was caused because there was an issue in > the startup code. It is not clear to me what it was supposed to do: to read > theme file before user settings or the other way around. But it is hard > problem to solve mainly because startup code is so entangled and complex. > Happily, there is, in fact, no need for global settings. In some places, such as computing the window's starting position and size, Leo uses the first loaded outline as a proxy. That's why g.app.db contains entries for specific .leo files. 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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS3_wpBXS4uMX%2B_xLWvmoa%2BRRktwXF8-C1U%2BtfG6HgC04A%40mail.gmail.com.
