• 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
Re: Force binding to set variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Force binding to set variable?


  • Subject: Re: Force binding to set variable?
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 29 Aug 2006 15:16:57 -0700
  • Thread-topic: Force binding to set variable?

On or about 8/29/06 2:48 PM, thus spake "Trygve Inda"
<email@hidden>:

>> On Tue, 29 Aug 2006 12:16:19 +0000, Trygve Inda <email@hidden>
>> said:
>>> I have a group of controls that are bound to elements of a dictionary
>>> (dict.controlA, dict.controlB etc.).
>>>
>>> The key/value only gets set when the control is changed by the user. Is
>>> there a way to force these bindings to set the keys? The reason is that this
>>> dict is written out to disk and then read by another process that would be
>>> cleaner if all the keys where there.
>>
>> Why don't *you* set the keys (when you create the dictionary)? m.
>
> I do now, but it'd be nice if one line of code could do it.

You *can* create a dictionary and set all its keys with one line of code
(dictionaryWithObjectsAndKeys:).

Or, if you don't want to hard-code it, store the dictionary as a .plist in
your bundle. m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide - Second Edition!
http://www.amazon.com/gp/product/0596102119
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/



 _______________________________________________
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

References: 
 >Re: Force binding to set variable? (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: north - east - south - west selector using NSMatrix?
  • Next by Date: Re: NSTextView - supplying word completions for insertion point?
  • Previous by thread: Re: Force binding to set variable?
  • Next by thread: Unsupported action type: GoToR
  • Index(es):
    • Date
    • Thread