Re: Preserving user interface properties in Core Data documents
Subject : Re: Preserving user interface properties in Core Data documents
From: "I. Savant" <email@hidden >
Date: Thu, 26 Apr 2007 16:35:28 -0400
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qcJqsLnhDVVHtRFofzm6ww4wh9+MA/+4AqRCgCF26yjeLgp/LaVS2EHTF77sve2Njy8VUNViIWsYFKGdziWnyAxhy9qAbkZJfPDrsHuhHCK8GveHJYIhIo9pPO6Nr/50katJOATtCRGet+gCPI/azv8UE4GWMCGvpXboJ4n7MTQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JrUfeM6n97uR5QZ9wWGE2pnFGbA6lxGRO/rqO1m/1JqiZK1O4ltq4/Jb9zjMPo3EBL67nG5Jhnh8w2zfCXVEliK4nMO0K1cMBDnW6wpbSutOxT3XiuJxGYDT6KKzevoT8l11/ZTTU/NicZU9ZQO2KrVQsu3ZT8eAZ8ODL9kuBGw=
On 4/26/07, I. Savant <email@hidden> wrote:
2 - Create an entity called "Settings" or some-such, always make sure
your document has a single instance of this entity (try to retrieve
one on opening, if none, create one), and create attributes like
"windowSize" (which you could store as an NSRect()->NSValue->NSData or
as a string (NSStringFromRect()), etc.).
... I forgot to mention that, with an entity, you can temporarily
disable undo when changing these settings, then re-enable them when
you're done. That'll prevent the changes from dirtying your document.
--
I.S.
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.