是否可以通过更改变量来触发事件?例如。
这将触发事件
Dim t As Integer
Dim Fire As Boolean
Private Sub Test
t = 0
Fire = True
IIf Fire, t=1, t=2
End sub
Run Code Online (Sandbox Code Playgroud)
在事件处理程序中
Select Case t
Case 0
'Do something
Case 1
'Do something
Case 2
'Do something
Case 3
'Do something
...
Run Code Online (Sandbox Code Playgroud)
Google调出了事件处理程序,并使用了类模块,但是我无法解决这个问题。
我通过 pip3 安装 mairadb 时收到错误。下面是命令和错误。
sudo pip3 install mariadb
------------------------------------------------------------------
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting mariadb
Using cached mariadb-1.0.0.tar.gz (78 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z5vslgxx/mariadb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z5vslgxx/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hfv4vge6
cwd: /tmp/pip-install-z5vslgxx/mariadb/
Complete output (12 lines):
/bin/sh: 1: mariadb_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-z5vslgxx/mariadb/setup.py", line 26, in <module>
cfg = get_config(options) …Run Code Online (Sandbox Code Playgroud)