Skip to content

Commit a8d7c64

Browse files
committed
Adding Alias (Supporting old projects based on WebUI 2.4.x)
1 parent 089d20a commit a8d7c64

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

PyPI/Package/src/webui/webui.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,17 @@ def set_runtime(self, runtime: Runtime) -> None:
14561456
"""
14571457
_raw.webui_set_runtime(c_size_t(self._window), c_size_t(runtime.value))
14581458

1459+
# -- Alias -----------------------------------
1460+
# Supporting old projects based on WebUI 2.4.x
1461+
1462+
def get_str(self, e: event, index: c_size_t = 0) -> str:
1463+
return e.get_string_at(index)
1464+
1465+
def get_int(self, e: event, index: c_size_t = 0) -> int:
1466+
return e.get_int_at(index)
1467+
1468+
def get_bool(self, e: event, index: c_size_t = 0) -> bool:
1469+
return e.get_bool_at(index)
14591470

14601471
# == Global functions below ===================================================
14611472

0 commit comments

Comments
 (0)