Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iOS/src/toga_iOS/widgets/slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_value(self):

def set_value(self, value):
self.value = value
self.native.setValue(value, animated=True)
self.native.setValue_animated_(value, True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely still a noob about Rubicon and ObjC... what's the functional difference between these?

@samschott samschott Nov 29, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically none at all.

The Objective-C method is setValue:animated:, in Rubicon Objective-C this translates to calling setValue_animated_().

Rubicon has some additional "magic" to accept a more Pythonic syntax setValue(value, *, animated) which relies loading and caching all method names of an object and its superclasses. It appears that the planned Rubicon update breaks this logic under some circumstances.

The last commit, i.e., this change, won't be permanent. It is only to confirm that the old syntax still works and narrow down the possible issues.


def get_min(self):
# Use the shadow copy, not the native value, to ensure round tripping.
Expand Down