On Sunday, March 15, 2020 at 3:41:09 PM UTC-5, Edward K. Ream wrote:

On Sun, Mar 15, 2020 at 1:29 PM Brian Theado wrote:
>
> What do you think about the following specific suggestion?
>>
>> Change all 'g.app' references in the methods of the LeoApp class to 
>> 'self'. Or add 'app = self' to the method and change 'g.app' to 'app'.
>>
>>
When I awoke this morning I understood why you might suggest this. It 
would, supposedly, make it possible to instantiate multiple instances of 
the LeoApp class.  I have just created #1537 
<https://github.com/leo-editor/leo-editor/issues/1537> for this.

As noted in the issue, it's not clear whether changing `g.app` to `self` in 
the LeoApp class would make any real difference. It might well mislead 
people.

The fact that g.app is a *singleton* instance of the LeoApp class is pretty 
much baked into Leo. For instance, g.app.db is an external file. Do we 
really want to complicate the code by creating a dummy instance of g.app.db 
in some cases?

I am willing to discuss this, but I suspect it complicate Leo's code rather 
than simplify it.

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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/afccb6f6-4174-4e9f-a6a0-676a63b129cd%40googlegroups.com.

Reply via email to