generated from OBJNULL/Dockerized-Rust
App implements CalcResult for more complex calculations
This commit is contained in:
parent
1bdeaa8cd7
commit
7489515962
1 changed files with 6 additions and 4 deletions
|
@ -16,8 +16,8 @@ export component Prorater inherits Window {
|
|||
out property <string> last_billing: "NULL";
|
||||
out property <string> current_membership;
|
||||
out property <string> new_membership;
|
||||
property <string> calculate_msg: "NULL";
|
||||
callback on_calculate() -> string;
|
||||
property <CalcResult> calculation_result;
|
||||
callback on_calculate() -> CalcResult;
|
||||
|
||||
VerticalBox {
|
||||
Image {
|
||||
|
@ -81,7 +81,7 @@ export component Prorater inherits Window {
|
|||
Button {
|
||||
text: "Calculate";
|
||||
clicked => {
|
||||
calculate_msg = on_calculate();
|
||||
calculation_result = on_calculate();
|
||||
calculation.show();
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,9 @@ export component Prorater inherits Window {
|
|||
}
|
||||
|
||||
calculation := Calculation {
|
||||
message: calculate_msg;
|
||||
message: calculation_result.message;
|
||||
start: calculation_result.start;
|
||||
end: calculation_result.end;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: (root.height - self.height) / 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue