tags:

views:

33

answers:

1

Maybe i'm just too blind to RTFM but what is the method to call to reverse the zoom (maximizing of a window) and bring the window back into the old state.

A: 

According to the documentation for the zoom: method (note the :), the inverse of zoom: is zoom::

This action method toggles the size and location of the window between its standard state (provided by the application as the “best” size to display the window’s data) and its user state (a new size and location the user may have set by moving or resizing the window).

If it's in the user state (not zoomed), it'll change to the standard state (zoom), and if it's in the standard state (zoomed), it'll change to the user state (unzoom).

The documentation also notes:

If there is no saved user state because there has been no previous zoom, the size and location of the window do not change.

This is what will happen if you started the window out in its standard state; since it was never in any other state, there is nothing for it to unzoom back to.

Peter Hosey