Skip to content

Commit

Permalink
Fixed some issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian-Winter committed Oct 1, 2023
1 parent d667f7b commit 41b18bb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ declare namespace Pytonium {
function testfunc(): any;
}
export namespace appState {
function registerForStateUpdates(eventName: string, namespaces: string[]): void;
function registerForStateUpdates(eventName: string, namespaces: string[], getUpdatesFromJavascript: boolean, getUpdatesFromPytonium: boolean): void;
function setState(namespace: string, key: string, value: any): void;
function getState(namespace: string, key: string): any;
function removeState(namespace: string, key: string): void;
Expand All @@ -148,7 +148,7 @@ We also have the option to handle and manage the application state with the help

````javascript
// Register to app state updates from Python and Javascript. You can pass a custom event name and a list of namespaces to subscribe to.
Pytonium.appState.registerForStateUpdates("ChangeDate", ["app-general"]);
Pytonium.appState.registerForStateUpdates("ChangeDate", ["app-general"], true, true);

// Add a listener for the custom event and retrieve information.
document.addEventListener('ChangeDate', function(event) {
Expand Down Expand Up @@ -402,7 +402,7 @@ Here is the corresponding HTML and Javascript code.
function CallToPythonExample()
{
// Register to app state updates from Python and Javascript. You can pass a custom event name and a list of namespaces to subscribe to.
Pytonium.appState.registerForStateUpdates("ChangeDate", ["app-general"]);
Pytonium.appState.registerForStateUpdates("ChangeDate", ["app-general"], true, true);
// Add a listener for the custom event and retrieve information.
document.addEventListener('ChangeDate', function(event) {
Expand Down Expand Up @@ -464,7 +464,7 @@ declare namespace Pytonium {
function test_two(arg1: string, arg2: number, arg3: number): void;
}
export namespace appState {
function registerForStateUpdates(eventName: string, namespaces: string[]): void;
function registerForStateUpdates(eventName: string, namespaces: string[], getUpdatesFromJavascript: boolean, getUpdatesFromPytonium: boolean): void;
function setState(namespace: string, key: string, value: any): void;
function getState(namespace: string, key: string): any;
function removeState(namespace: string, key: string): void;
Expand Down
2 changes: 1 addition & 1 deletion src/pytonium_python_framework/Pytonium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def decorator(func):
sleep(2.0)
if os.path.exists(pytonium_bin_zip_path):
os.remove(pytonium_bin_zip_path)

if os.path.exists(other_pytonium_bin_zip_path):
os.remove(other_pytonium_bin_zip_path)

Expand Down
2 changes: 1 addition & 1 deletion src/pytonium_python_framework/Pytonium/src/pytonium.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ cdef class Pytonium:
object_map["appState"] = []

object_map["appState"].append(
f"function registerForStateUpdates(eventName: string, namespaces: string[], getUpdatesFromJavascript: bool, getUpdatesFromPytonium: bool): void;"
f"function registerForStateUpdates(eventName: string, namespaces: string[], getUpdatesFromJavascript: boolean, getUpdatesFromPytonium: boolean): void;"
)
object_map["appState"].append(
f"function setState(namespace: string, key: string, value: any): void;"
Expand Down
2 changes: 1 addition & 1 deletion src/pytonium_python_framework/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "Pytonium"
version = "0.0.12"
version = "0.0.13"
description = "A framework for building python apps, with a GUI based on the web-technologies HTML, CSS and Javascript."
readme = "README.md"
requires-python = ">=3.10"
Expand Down

0 comments on commit 41b18bb

Please sign in to comment.