supportedOrientations doesn't work

At the top of my main file I have supportedOrientations(LANDSCAPE_ANY). This should prevent the device from going to portrait mode. However, when I run the project, I can change to any orientation. I have tried this on some of the test projects and it appears impossible to lock orientation on those too. I’m confused.

I’ve seen this post, but I’m not using AirCode so that isn’t the problem.

@disorientedperson It’s a known problem that was reported a while back. The response was that it’s being replaced with something different in a future release. I think I posted it somewhere in the Codea 3.0 discussion, not sure though.

EDIT: My report for supportedOrientation not working is on the 2nd page of the Codea 3.0 discussion.

@disorientedperson It may be that you are putting it in the setup() function, instead put it before:

supportedOrientations(LANDSCAPE_ANY)
function setup()
     -- Your setup
end

@CamelCoder I have it before the setup function, but it doesn’t work.