Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubicon update #2978

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
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
Contributor

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?

Copy link
Member Author

@samschott samschott Nov 29, 2024

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