Closed kangz12345 closed 1 year ago
First of all, I wonder how you tested createdApp()
and destroyApp()
.
Concretely, how did you check if result
is updated not using while not result.done: ...
?
First of all, I wonder how you tested
createdApp()
anddestroyApp()
. Concretely, how did you check ifresult
is updated not usingwhile not result.done: ...
?
I'm sorry for the missing test codes... 😄
I used the interactive console for testing.
So I import swift
and load the setup.json file, and then I call the swift-calls. Then I click the OK button from the prompt, and finally I check if the result object is updated.
I applied the reviews and add one more feature in the last commit.
I implemented the simplified swift-call interface. The newly introduced usage is as follows:
Every
BaseApp
has a new attribute:swiftcall
.From that, one can call any swift-call just like calling a method, e.g.,
self.swiftcall.destroyApp(name="logger")
. All the arguments must be given as keyword arguments, for clarity.It will return a
SwiftcallResult
instance. It is updated when the swift-call is done and the result comes back via theswiftcallReturned
signal. One may want to keep it to check the result, e.g.:One must not block on the result to be done, e.g.,
while not result.done: ...
, in the main thread, since it will freeze the entire GUI process.I have tested
createApp()
anddestroyApp()
. As I test it, I fixed a bug inswift
module that I implemented in #142.This closes #136.