Hello, I am trying to get my hands wet with Xcode. Unsurprisingly, I’m confused. Somehow I am entirely unable to link the IBOutlet() thingies to my xib file. I followed the tutorials on git to the letter but cannot figure out where I’m going wrong. For starters, I get the following:
In Xcode, I’m not sure how it’s supposed to work, but Control-dragging things doesn’t seem to work. When I Control-drag from a checbkox in the xib to File’s Owner, I get a popup only reading “Outlets: formatter, menu, nextKeyView”, but not my IBOutlets I have defined in my plugin.py. I added the plugin class name as the name for the File’s Owner. The plugin.py file is added as a file via “Add File…”.
I’m working in Xcode 14 beta now. Linking stuff between xib and Python files works! Problem is, there seems to be something wrong with compiling the .xib:
xcode-select: error: tool 'ibtool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Hello again. I’m having a very annoying issue again. Everything should be working, but for some reason, the link between my text field in the xib and my python plugin doesn’t work.
This is linked in Xcode (slightly different names of course):
But when changing the value in the UI, nothing happens. Nothing is printed to the macro window, the function is not called. Why?
Edit: no idea what it was in the end, but I used camel case for the action functions, tried out different ways of getting the sender values and wrapping them as str()/float() in python. In any case, it works now.
Always use camel case in selector names. Underscored have a special meaning in pyobjc (they replace the colons and argument positions). Extra ones will mess things up.