• 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
Temporary bindings / One way bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporary bindings / One way bindings


  • Subject: Temporary bindings / One way bindings
  • From: Ken Tabb <email@hidden>
  • Date: Mon, 11 Jul 2005 18:25:36 +0100

Hi,

I have a doc based app that uses bindings to link to preferences (in much the same way as the 'Binding Your Preferences in Cocoa' document at http://developer.apple.com/cocoa/cocoabindings.html shows).

Carrying on from the example in that document, I'd like my app to have its preferences window bound to the defaults (as per the ADC article).

However I'd like the app to influence the creation of a new document, using defaults stored in the app's preferences, but I don't want the document to be permanently bound to the app's preferences - because when the user changes a specific document's colour, I don't want the app's default colour (for instance) to be updated; the user was changing a specific document, not all documents / the default.

While it makes sense for the preferences window to be bound to the defaults in this case, what is the best system for using those defaults to influence a new document's creation?

I'm thinking I can either temporarily bind the document's properties to the defaults, until the document has finished being created, at which point I unbind everything between that document and the preferences, or I write a load of glue code to give the new documents the various default information it needs.

Which way would be less work / more elegant / easier to maintain? I'm guessing both methods are as broad as they are wide in actual fact. Standard "could be barking up the wrong tree" caveats apply of course...

Cheers,
Ken

- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer Science
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/

Certified non-Microsoft Solution Provider

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Inserting Special Characters into a String
  • Next by Date: Re: getting USB devices info
  • Previous by thread: Re: Tooltips on individual segmented cells
  • Next by thread: [OT] Knowing hardware addresses
  • Index(es):
    • Date
    • Thread