toggle autosizing

Thanks once again Dominik! That project explained exactly what I needed to implement changing autosizing in my app.

for fiftyfour123: here’s how I did it. And I didn’t get it right until I correctly referenced everything so that’s probably your problem.
I have an image view inside of a scroll view on my main window that I wanted to change the autosizing on the fly. So here’s all it took.

on awake from nib theObject call method "setAutoresizesSubviews:" of (call method "contentView" of (scroll view "scrollView" of window "main")) with parameter yes end awake from nib
and then this line anywhere in the project will make the change. Obviously you set the number to whatever you need as defined in Dominik’s demo.

call method "setAutoresizingMask:" of (image view "imageView" of scroll view "scrollView" of window "main") with parameter 18