• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Use Window Frame Autosave, or fall back to Cascade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use Window Frame Autosave, or fall back to Cascade


  • Subject: Use Window Frame Autosave, or fall back to Cascade
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 19 Jun 2007 19:48:44 -0700

The desirable behavior for my document windows would be:

   If autosave frame is available, use it.
   Otherwise, cascade from some already-opened document window.

There is one Apple multi-document-based application (Automator) that works this way (most of the time). But most of them (TextEdit, MiniGlot) cascade all documents, whether new or old.

It seems that the options available in Cocoa are:
(1) Always cascade document windows (default).
(2) Use autosave frame when available, by implementing code given in [1].
But then when autosave frame is not available (such as for a new
document), windows pile on top of one another, which is really bad.


Although I could write a bunch of code to get my desired behavior, and indeed at least one other person says he has done so a long time ago [2], it seems like this is alot harder than it should be.

Is there an easier way? At least if NSApplication could give me a function like I know Apple must have buried in there somewhere...

    NSRect FrameForNextCascadedWindow() ;

that would eliminate most of the code I need to write, and more than most of the bugs which will come from picking which existing window to cascade from, offsetting for title bar size, screen size, etc.). But I can't find anything like that.

Hoping to avoid a kludge,

Jerry Krinock

[1] http://developer.apple.com/documentation/Cocoa/Conceptual/ WinPanel/Tasks/SavingWindowPosition.html
[2] http://lists.apple.com/archives/cocoa-dev/2002/Jul/msg00848.html
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Use Window Frame Autosave, or fall back to Cascade
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: NSImageView blurring bug
  • Next by Date: Re: Use Window Frame Autosave, or fall back to Cascade
  • Previous by thread: Re: NSImageView blurring bug
  • Next by thread: Re: Use Window Frame Autosave, or fall back to Cascade
  • Index(es):
    • Date
    • Thread