Re: What Size My Window?
Re: What Size My Window?
- Subject: Re: What Size My Window?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 5 Sep 2008 07:59:38 +0700
On 4 Sep 2008, at 15:49, Uli Kusterer wrote:
On 04.09.2008, at 10:10, Gerriet M. Denkmann wrote:
6. Other?
So: is there some commonly agreed upon right strategy?
Are there some official guidelines for document window sizes?
You can save the size of your window in some plist in your
document using -stringWithSavedFrame and restore it using -
setFrameFromString:. That would be per-document. The one issue this
has is that the user would have to save the document each time to
make this stick. So just moving a window dirties the document.
It's a little hard to do this using an NSDocument, but a common
approach is to use a resource or xattributes to attach the window
positions to a file without touching the actual document. That way,
diff and similar tools won't think it's changed, and if the
position gets lost during internet transfer, that's not too bad, as
it's not vital information.
Although keeping size per document is not my current aim, the idea of
using xattributes is a very neat one.
I will definitely keep this in mind for the future.
Thanks for this hint!
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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