After doing a lot of work on a Project, I needed to add a button.
If I duplicate an existing button, it will be bound to the right handler in main script.
But if I create a new one, it’s impossible to bind it.
And it’s the same for every control on the window.
I guess It’s a normal behavior but I don’t understand why and how to make bindings possible again?
While answering, I figured out where is the problem:
I have a script that compares the the code in XC vs SD then ask what to do if they differs.
If the choice is to keep the XC source, then it replaces the SD version.
I guess the LF are changed to CR at this time.
Thank you for pointing me on this, without your help, I would be searching in decades!
What I did not get is that Script Debugger is always converting linefeeds to CR at compile time, regardless how the preference is set.
When saving from Script Debugger, I resolved this with save document 1 line endings Unix endings.
And for comparison before opening the Xcode script in Script Debugger, I added a statement that changes LF to CR.