Auto Layout for desktop?

based on the Xojo blog: it is about iOS Auto Layout but keeps mentioning desktop - what are the chances of Auto layout coming to the desktop?

http://www.xojo.com/blog/en/2014/01/ios-progress-report.php

From the post:

Future. No timeframe at this point.

From last years XDC keynote, the next platform for AutoLayout is Web and then finally Desktop. http://www.bkeeneybriefs.com/2013/05/xojo-for-ios/

It makes sense : the screen size diversity is very large on the web, where Auto Layout will be extremely useful.

iOS initially since we plan to support iOS 7 which runs on 3.5" & 4" (iPhone 4 and iPhone 5) screens (landscape & portrait) iPad screens (landscape & portrait)

Managing screen sizes with iOS will indeed require Auto Layout : just imagine having to do it for every situation with precise positionning :

  • 3"1/2 portrait
  • 3"1/2 landscape
  • 4" Portrait
  • 4" Landscape
  • 6" Portrait
  • 6" Landscape
  • 9" Portrait
  • 9" Landscape

Plus Retina.

That’s a lot :stuck_out_tongue_winking_eye:

I am a lot less sure about Auto Layout for desktop (OP) : apart managing changing windows sizes, it seems less important.

It’s not just changing layout sizes though. Auto-layout solves a two problems for many of our desktop users:

  1. Different controls sizes on different platforms
  2. Different controls sizes for different localizations

That last one is really important for apps that are localized into multiple languages. You often end up having to create a layout that works for all languages but is not ideal for any one of them. Auto-layout completely solves this problem.

[quote=59539:@Geoff Perlman]It’s not just changing layout sizes though. Auto-layout solves a two problems for many of our desktop users:

  1. Different controls sizes on different platforms
  2. Different controls sizes for different localizations

That last one is really important for apps that are localized into multiple languages. You often end up having to create a layout that works for all languages but is not ideal for any one of them. Auto-layout completely solves this problem.[/quote]

this is exciting… i need this 1 and 2 and also different screen resolution…

[quote=59538:@Michel Bujardet]
I am a lot less sure about Auto Layout for desktop (OP) : apart managing changing windows sizes, it seems less important.[/quote]
Its important just in terms of reducing the amount of work you need to do to get a layout to work “as expected”.
But it has less import when it comes to things like handling rotation and screen size when compared to iOS or other mobile platforms.

But, as Geoff mentioned, when you localize an application it will be REALLY useful as you position things relative to each other.
Now when you change contents things will resize nicely and if you change platforms you don’t have to write a bunch of code to handle things.
Linux uses slightly taller default heights so you’d have to have a bunch of code to reposition things from OS X Windows & Linux to deal with this.

Autolayout can make a bunch of that code go away - if not all of it.

Oh I understand. This is indeed quite useful for localization. I spend often quite a while trying to find the most compact translation because I do not want to modify buttons and label sizes. If this becomes automatic, it’s great :slight_smile:

[quote=59539:@Geoff Perlman]…
That last one is really important for apps that are localized into multiple languages. You often end up having to create a layout that works for all languages but is not ideal for any one of them. Auto-layout completely solves this problem.[/quote] It just postpones the same problem - or moves it to another location:

First we have unexpected results with translated text, displayed on labels. With autolayout we can expect surprising results with the corresponding textfields, just being pushed somewhere.

I don’t believe that auto-layout will be feasible for anything that is not as simple as a calculator gui on a iphone…

If you really believe this then you really need to watch
https://developer.apple.com/videos/wwdc/2012/?include=232#232
https://developer.apple.com/videos/wwdc/2012/?include=228#228
https://developer.apple.com/videos/wwdc/2012/?include=202#202
And even older ones like
https://developer.apple.com/videos/wwdc/2011/includes/cocoa-autolayout.html#cocoa-autolayout

Then grab Xcode 5 on OS X 10.9 and try it in the simulator
It’s very powerful and even relatively simple to use
It’s not going to write your code for you BUT it can certainly make it much easier to create layouts that work without the gobs of code you would need to do this today

I’m fighting with some nasty layout stuff on the desktop this morning, and was hoping that autolayout would have made its way to desktop by now… but with this morning’s final release of 2015R1, it’s not there yet for desktop.

I know the answer is “when we get to it”, but is there any indication of a basic timeframe for autolayout to arrive for desktop? Should I stop trying to get my hopes up for sometime in 2015?

You already know the answer - it’ll be here when its here :slight_smile:

From what I have read, a lot of people are extremely confused and frustrated by the auto-layout feature.
Personally, I am more than happy not to have it available for desktop - but that’s just me :slight_smile:

It has been a while I use a proportional method that sizes controls and keep their relative placement on resizeable windows. It does that by keeping left, width, top and height constant relative to the window size.

I am not sure Auto Layout would do a better job. Yet, after working intensely with iOS for now some three months, I am convinced it could be precious especially for Web Edition, where there is no way to know in advance what the browser client size and shape will be.

In Auto Layout, controls can be made relative not only to window (View) left and top, it can be made relative to other controls, as well as to the center of the view. That makes for some “interesting” logic, and it can indeed be confusing. But on the end, on devices which screen size vary widely, and which can be rotated, it works very nicely.

On Desktop, where it is often wise to keep a window non resizeable, and where some controls simply do not work well with variable size like SegmentedControl, where on top of it text size should sometimes be modifed to accommodate resize, it may not be the miracle fix all some expect.

sigh

I know I know I know… but can I use a lifeline? Maybe someone else in the audience has a different answer…

If you share your layout issue, maybe there is a solution today, pending a future implementation of Auto Layout on desktop…

Sure @Michel Bujardet: Consider the following as laid out in the Xojo window editor:

6 Boxes, 2 columns, 3 rows. When this container control changes dimensions, I want the boxes to all grow/shrink to fit the available space, but maintain their distances from each other. This will run on a variety of Windows and Mac computers, and all different resolutions, so some users may have a very wide landscape screen, others will have a 4:3 ratio, etc. This container control is embedded into a larger window that has more elements on all 4 sides of it, but this container will be the main content area of the window and needs to grow/shrink with the window.

The approach I’m currently considering is in the resized or resizing events of the containerControl do the math manually to adjust the X,Y and W,H of every element in the container.

This sort of layout dilemma is exactly what autolayout fixes.

[quote=168408:@Kimball Larsen]
I know I know I know… but can I use a lifeline? Maybe someone else in the audience has a different answer…[/quote]

Sorry
Not sticking any body parts out where someone might chop them off saying “But you promised!”