Better use wrapper functions with local init instead of global init? #21
Replies: 2 comments 2 replies
-
Just another comment: often I write wrapper functions or objects for calls to libraries I incorporate into my own code. It is generally more future-safe, as I have to change code only in one place if I want to use another library or have to fix something etc. So in fact I had already those wrappers, but only one-liners, which I just had to extend a little bit. |
Beta Was this translation helpful? Give feedback.
-
I know that if This fix is op, it fixes Any other reason that might make it fail, by restarting it every time adding a hook to catch when |
Beta Was this translation helpful? Give feedback.
-
Hi,
I stumbled over the issue that VD stopped working after some switching between desktops and I had to reload my whole script. And I couldn't find out why this happened. To be honest, it is quite cumbersome to find out why someone elses code does not work as expected, so I didn't really start to find out what was happening. But I fixed it for my case. I removed the "global" VD.init proposed in the documentation, and instead wrote wrappers for the VD functions I need (just case by case), like this example:
The v := "" should call the garbage collector on the object. For now, that works.
@FuPeiJiang: Cool library, much work you did, appreciated, thanks for providing that to us!
CU
Volker
Beta Was this translation helpful? Give feedback.
All reactions