atlas-engineer / cl-electron

Lisp Interface to Electron.
BSD 3-Clause "New" or "Revised" License
16 stars 1 forks source link

Replace globals by CLOS #9

Closed Ambrevar closed 1 year ago

Ambrevar commented 1 year ago

Currently there are too many globals, which makes it rather unwieldy to use this as a library.

Instead we can create a dedicated class which will contain the socket paths, the processes, etc.

This means that all API points must refer to an instance of that class. Turns out that they already specialize on browser-view, etc., which inherits from remote-object, so all we got to do is add an unexported slot there that contains the instance.

aadcg commented 1 year ago

Makes sense!

Ambrevar commented 1 year ago

Fixed with 792754de0ba75d4bff2ad9a0b15c28f3945d4510.