From 8cf139f349088ed54a8acf720a02ecd4d478c0de Mon Sep 17 00:00:00 2001 From: Harald Schneider Date: Wed, 22 Nov 2023 09:39:30 +0100 Subject: [PATCH] Update --- README.md | 14 +++++++------- extensions/python/NeutralinoExtension.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3ce4159..d1bb110 100644 --- a/README.md +++ b/README.md @@ -169,13 +169,13 @@ Below this link, you see ## Python methods overview -| Method | Description | -|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------| -| NeutralinoExtension(debug) | Extension class. debug: Print data flow to the terminal. | -| debugLog(msg, tag="info") | Write a message to the terminal. msg: Message, tag: The message type, "in" for incoming, "out" for outgoing, "info" for others. | -| parseFunctionCall(d) | Extracts function-name (f) and parameter-data (p) from a message data package. Returns (f, p). | -| async run(onReceiveMessage) | Starts the sockethandler main loop. onReceiveMessage: Callback function for incoming messages. | -| sendMessage(event, data) | Send a message to Neutralino. event: Event-name, data: Data package as string or JSON dict. | +| Method | Description | +|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| NeutralinoExtension(debug=false) | Extension class. debug: Print data flow to the terminal. | +| debugLog(msg, tag="info") | Write a message to the terminal. msg: Message, tag: The message type, "in" for incoming, "out" for outgoing, "info" for others. | +| parseFunctionCall(d) | Extracts function-name (f) and parameter-data (p) from a message data package. Returns (f, p). | +| async run(onReceiveMessage) | Starts the sockethandler main loop. onReceiveMessage: Callback function for incoming messages. | +| sendMessage(event, data=None) | Send a message to Neutralino. event: Event-name, data: Data package as string or JSON dict. | ## Neutralino methods overview diff --git a/extensions/python/NeutralinoExtension.py b/extensions/python/NeutralinoExtension.py index 292809a..a7e5d57 100644 --- a/extensions/python/NeutralinoExtension.py +++ b/extensions/python/NeutralinoExtension.py @@ -18,7 +18,7 @@ class NeutralinoExtension: def __init__(self, debug=False): - self.version = "1.1.5" + self.version = "1.1.6" parser = ArgumentParser() parser.add_argument('--nl-port') @@ -41,7 +41,7 @@ def __init__(self, debug=False): self.termOnWindowClose = True # Terminate on windowCloseEvent message self.debugLog(f"{self.idExtension} running on port {self.port}") - def sendMessage(self, event, data): + def sendMessage(self, event, data=None): """ Add a data package to the sending queue. Triggers an event in the parent app.