• 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
Handling preferences changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling preferences changes


  • Subject: Handling preferences changes
  • From: Steve Israelson <email@hidden>
  • Date: Thu, 3 May 2007 10:21:31 -0700

I am trying to decide on the best way to handle changes to my preferences.
What I have is many preferences for things like fonts, line styles, colors etc for many UI elements like divider lines, connector lines, etc.
These settings are all grouped into one style and there can be more than one style, like the thick lines style, and the reddish style etc.
These settings are all stored in a CoreData DB.


The way I see it, there are two possible ways to handle updating the UI in my various windows when some settings in the prefs are changed:
1) Each UI object that makes use of any one setting retains that setting and observes changes made to it. Also must observe changes made to the object that indicates which style group to use. This means that there are potentially many many observations going on.


2) The preferences controller can observe everything and detect changes made and then broadcast a general message indicating that some preference related to UI changed and all UI objects can the re- render. This would mean every little change made will cause a re-draw of everything since knowing what changed is not handled.

3) ?  Your cool solution here.

Does any of this seem reasonable? It seems to me that solution (1) is the least error prone, but it also seems like a lot of work.


_______________________________________________

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: Handling preferences changes
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Developer Needed - Cocoa/Java
  • Next by Date: Re: Handling preferences changes
  • Previous by thread: Developer Needed - Cocoa/Java
  • Next by thread: Re: Handling preferences changes
  • Index(es):
    • Date
    • Thread