Interface Builder Strangeness


Peter Hudson
 

Hi All

I have made some changes in a nib file in my application.
I deleted a box with some buttons etc in it and moved a few buttons around in a tab view.
The nib saves fine - when I open the nib up outside the project, my edits are all there.

When I build and run the application, what I get onscreen is the original pre-edited interface.

?

I’ve tried doing a clean build, dropped the nib into another project etc...

Any suggestions gratefully received !

All the best

Peter


macOS Monterey 12.6.3, Xcode 13.2


Rick Aurbach
 

I've seen some weird behavior with Interface Builder in Xcode 13.2. Originally, it forced me to drop back to 13.1. However, I've recently tried the 13.3 beta download and it appears to work better. I'd suggest trying 13.3 beta and see if it helps.


Jack Brindle
 

If you have a copy of the xib file before the changes were made, open it as a text file, and compare it to the version with the changes.
To open as source, right click on the xib in the Project source area, the select Open As… -> Source Code.
You can also compare the two files using a diff tool such as Xcode’s FileMerge. If you find that the files are indeed different, then you need to look for a different solution.
Perhaps there might be two xib files that are very similar, and you are not editing the one you think you are editing? This is very easy to do, and had bitten most of us.

The only real issue I have seen in IB over the past few years involves multiple NSTableViews in an NSView. They have a real problem with keeping their size, even when
the constraints are properly set.

Good luck with this one. This is the kind of problem that drives all of us up the wall.

Jack

On Feb 19, 2023, at 5:04 AM, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Hi All

I have made some changes in a nib file in my application.
I deleted a box with some buttons etc in it and moved a few buttons around in a tab view.
The nib saves fine - when I open the nib up outside the project, my edits are all there.

When I build and run the application, what I get onscreen is the original pre-edited interface.

?

I’ve tried doing a clean build, dropped the nib into another project etc...

Any suggestions gratefully received !

All the best

Peter


macOS Monterey 12.6.3, Xcode 13.2




Peter Hudson
 

Hi Jack

Thanks for the suggestions. I tried to look at the files in FileMerge - but it choked on them.
I then tried to open as source - and my Xcode didn’t have that as a menu option. The menu did however have an option to export as XIB ( the file was a NIB ) which I did. This export as XIB has fixed the problem !

All my files are NIBs - should they be XIBs ? I can’t find an explanation anywhere about the difference.

All the best

Peter

On 20 Feb 2023, at 05:15, Jack Brindle via groups.io <jackbrindle@...> wrote:

If you have a copy of the xib file before the changes were made, open it as a text file, and compare it to the version with the changes.
To open as source, right click on the xib in the Project source area, the select Open As… -> Source Code.
You can also compare the two files using a diff tool such as Xcode’s FileMerge. If you find that the files are indeed different, then you need to look for a different solution.
Perhaps there might be two xib files that are very similar, and you are not editing the one you think you are editing? This is very easy to do, and had bitten most of us.

The only real issue I have seen in IB over the past few years involves multiple NSTableViews in an NSView. They have a real problem with keeping their size, even when
the constraints are properly set.

Good luck with this one. This is the kind of problem that drives all of us up the wall.

Jack

On Feb 19, 2023, at 5:04 AM, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Hi All

I have made some changes in a nib file in my application.
I deleted a box with some buttons etc in it and moved a few buttons around in a tab view.
The nib saves fine - when I open the nib up outside the project, my edits are all there.

When I build and run the application, what I get onscreen is the original pre-edited interface.

?

I’ve tried doing a clean build, dropped the nib into another project etc...

Any suggestions gratefully received !

All the best

Peter


macOS Monterey 12.6.3, Xcode 13.2








Alex Zavatone
 

I’ve seen strangeness with the IB in that changes in IB aren’t compiled into the app until after the next 2 builds. I’d clear the build folder, quit and restart Xcode and see if that fixes it.

On Feb 19, 2023, at 5:04 AM, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Hi All

I have made some changes in a nib file in my application.
I deleted a box with some buttons etc in it and moved a few buttons around in a tab view.
The nib saves fine - when I open the nib up outside the project, my edits are all there.

When I build and run the application, what I get onscreen is the original pre-edited interface.

?

I’ve tried doing a clean build, dropped the nib into another project etc...

Any suggestions gratefully received !

All the best

Peter


macOS Monterey 12.6.3, Xcode 13.2




Alex Zavatone
 

I think you can open the nib in a text editor.

On Feb 20, 2023, at 3:50 AM, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Hi Jack

Thanks for the suggestions. I tried to look at the files in FileMerge - but it choked on them.
I then tried to open as source - and my Xcode didn’t have that as a menu option. The menu did however have an option to export as XIB ( the file was a NIB ) which I did. This export as XIB has fixed the problem !

All my files are NIBs - should they be XIBs ? I can’t find an explanation anywhere about the difference.

All the best

Peter



On 20 Feb 2023, at 05:15, Jack Brindle via groups.io <jackbrindle@...> wrote:

If you have a copy of the xib file before the changes were made, open it as a text file, and compare it to the version with the changes.
To open as source, right click on the xib in the Project source area, the select Open As… -> Source Code.
You can also compare the two files using a diff tool such as Xcode’s FileMerge. If you find that the files are indeed different, then you need to look for a different solution.
Perhaps there might be two xib files that are very similar, and you are not editing the one you think you are editing? This is very easy to do, and had bitten most of us.

The only real issue I have seen in IB over the past few years involves multiple NSTableViews in an NSView. They have a real problem with keeping their size, even when
the constraints are properly set.

Good luck with this one. This is the kind of problem that drives all of us up the wall.

Jack

On Feb 19, 2023, at 5:04 AM, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Hi All

I have made some changes in a nib file in my application.
I deleted a box with some buttons etc in it and moved a few buttons around in a tab view.
The nib saves fine - when I open the nib up outside the project, my edits are all there.

When I build and run the application, what I get onscreen is the original pre-edited interface.

?

I’ve tried doing a clean build, dropped the nib into another project etc...

Any suggestions gratefully received !

All the best

Peter


macOS Monterey 12.6.3, Xcode 13.2












Steve Mills
 

On Feb 20, 2023, at 03:50, Peter Hudson via groups.io <Peter.hudson@...> wrote:

Thanks for the suggestions. I tried to look at the files in FileMerge - but it choked on them.
I then tried to open as source - and my Xcode didn’t have that as a menu option. The menu did however have an option to export as XIB ( the file was a NIB ) which I did. This export as XIB has fixed the problem !

All my files are NIBs - should they be XIBs ? I can’t find an explanation anywhere about the difference.
Yes, they should be xib. xib = XML (or Xcode) Interface Builder. nib = NeXT Interface Builder, a term that has its roots stretch far back to NeXT, hence the name. These days xib is the file you create in Xcode, and nib is the file Xcode generates as the final file in the output.

--
Steve Mills
Drummer, Mac geek