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

How to be able to access change objects' states already created within my XIB file #500

Open
leifadev opened this issue Oct 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@leifadev
Copy link

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

@leifadev leifadev added the bug Something isn't working label Oct 10, 2022
@leifadev
Copy link
Author

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant