Consolidated sofi.app classes into SofiEventProtocol and Sofi.
Removed Sofi.interface and folded its methods into the main Sofi
class.
Added singleclient parameter when instantiating Sofi to restrict
use to one user interface. It will reject any connection requests
after the first one.
All command dispatch methods now take a client keyword parameter
to specify which UI client they will be sent to.
The client that initiated an event is added to the event dict
passed to every event function and should be used in any dispatch
methods called from that function.
The event callback registry now uses sets instead of lists to prevent
the same callback being registered twice for the same exact event.
Sofi.clients keeps track of all connected UI clients.
Polished multi-clients mode and code cleanup
sofi.app
classes intoSofiEventProtocol
andSofi
.Sofi.interface
and folded its methods into the mainSofi
class.singleclient
parameter when instantiatingSofi
to restrict use to one user interface. It will reject any connection requests after the first one.client
keyword parameter to specify which UI client they will be sent to.event
dict passed to every event function and should be used in any dispatch methods called from that function.Sofi.clients
keeps track of all connected UI clients.