Skip to content

Commit

Permalink
Merge pull request #1757 from samschott/numberinput-fix-impl-access
Browse files Browse the repository at this point in the history
[cocoa] Fix impl access in NumberInput widget
  • Loading branch information
freakboy3742 authored Jan 29, 2023
2 parents e360892 + 596f46c commit e590dae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/1757.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix updating the value and calling on_change for NumberInput widgets in Cococa.
2 changes: 1 addition & 1 deletion cocoa/src/toga_cocoa/widgets/numberinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def onChange_(self, stepper) -> None:
@objc_method
def controlTextDidChange_(self, notification) -> None:
try:
value = str(self._impl.input.stringValue)
value = str(self.impl.input.stringValue)
# Try to convert to a decimal. If the value isn't a number,
# this will raise InvalidOperation
Decimal(value)
Expand Down

0 comments on commit e590dae

Please sign in to comment.