Replies: 1 comment
-
Sorry, it was working all along, it just didn't look like it. The problem was that PyCharm's intellisense wasn't showing the objects variables and methods in the callback function. The object was successfully passed as an argument to the callback, but PyCharm hid the objects variables and methods from view, it seems, because I was 'wrongly?' accessing protected members of the class ("Access to protected member *** of a class"). When I manually typed in the various objects variables and methods, PyCharm recognized them as valid code and intellisense acknowledged the objects variables and methods thereafter. So, all good! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Jonathan, how do you send a class object for the 'user_data' argument in a callback, such that in the callback function the class object can be referenced using the 'dot operator'? For example, say I create a class (Coordinates) to store some coordinate data and create an instance of that class (my_coordinates) and store some data in a class variable (my_coordinates.x_pos = 55), then pass the name of the class instance (my_coordinates) in the callback 'user_data', such that in the callback function I can access the class object to do this:- print(user_data.x_pos) etc?
Beta Was this translation helpful? Give feedback.
All reactions