pyobjc
pyobjc copied to clipboard
How to be able to access change objects' states already created within my XIB file
Describe the bug Cannot find a solution or way to use my viewcontroller or other methods to be able to change the state of UI elements such as NSComboBox, etc. (besides just Text Labels)
Platform information
- Python version 3.9
- How was python installed (python.org, anaconda, homebrew, ...) homebrew
- macOS version 10.15.7
To Reproduce Have my XIB file, to be able to have it's elements referenced and used/states changed from my code (e.g. WindowController.py)
Expected behavior Can change the state of certain things such as within a ComboBox (NSComboBox) it's available options (objectValues or addItems:(withObjectValues)) from my code or python files. However I haven't found out a way to do this as I explain in more detail below.
In this stackoverflow thread it's said (from Objective-C's drag and drop IBOutlet in to code perspective), that to change the states you just need the Files Owner object to change the states, but I can't seem to accomplish that, to me that means being able to for example change the value of a NSSlider etc.
I think it's different using a scratch project in Xcode with PyObj-C for me, so I am asking here now, I have searched a lot for answers or solutions to figure out how to access already created XIB elements, but so far I haven't been able to see a method that returns the object in the XIB from NSView or AppKit or something.
Additional context If I can't really do this, how can I find the already existing coordinates for my UI elements in my XIB file via xcode so I can add them all in my scripts so there instantiated there so I don't need to try to access anything outside
bump