Auto-Layout Heads Up

As if Auto-Layout was not annoying enough…

Apple appears to have changed something to do with constraints which affects Xojo 2018. Here’s the scenario:

I have a line in a container that goes from the top to the bottom. The constraint for the top was set equal to Parent.Left. Because this was effectively zero, the line was in the correct place, but because Top was related to Left, the App crashes at startup.

Such problems can be very difficult to track down. Xojo gives no clue. I ended up removing things until it stopped crashing and then was able to check just a few controls’ constraints.

Note to Xojo: Please check for constraint violations as compile time. Better, make Auto-Layout optional.

Hope this helps someone.

-Bob Gordon (who can now get back to actually being productive)

An update:

So, I’m putting things back together, and I see why this happens.

If one is changing the Top auto-layout relative to something, and you change the Relative To; the Edge defaults to Left.

Given the change, I would think this is a bug.


This just happened to me, too. I usually remember that Xojo changes the Edge to Left when it shouldn’t, but missed it and had to wade through the Console log to figure it out. I agree that Xojo should help with this.

Did you create a feedback case ?

We have one.