• 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: Programmatically adjusting NSValueTransformer of a bound NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically adjusting NSValueTransformer of a bound NSTextField


  • Subject: Re: Programmatically adjusting NSValueTransformer of a bound NSTextField
  • From: Kiel Gillard <email@hidden>
  • Date: Wed, 27 Oct 2010 16:23:05 +1100

Hey guys,

Please ignore my post. It's been a long day and I had one very bad return value in one of my value transformers. It always helps to take a break and return to the problem with a fresh perspective!

Kiel

On 27/10/2010, at 3:45 PM, Kiel Gillard wrote:

> Hi all,
>
> Can you please look at this very small and rough reproduction of my problem <http://dl.dropbox.com/u/1064994/cocoadev bindings.zip>.
>
> I want to present measured values of my model with respect to the user's locale. For example, I want to present a distance in imperial units of measurement instead of metric. I am using NSValueTransformer subclasses to transform the units of my model into imperial or metric units.
>
> When I receive a notification indicating the user's measurement locale changes in System Preferences, my code unbinds and re-binds the value binding of a text field to an instance variable of the controller. I provide the appropriate value transformer in the options of the binding.
>
> I was wondering if you could please help me with my problem. My NSTextField object is not editable when the change in system locale causes the text field to use a value transformer different from the initial. Specifically, the binding is configured in Interface Builder to use the metric value transformer but when I use System Preferences to adjust my locale preferences to use an imperial (U.S.) system, my text field becomes unchangeable. Adjusting the locale preferences to use a metric system re-enables my text field for editing.
>
> Any thoughts, comments or suggestions would be extremely helpful and appreciated!
>
> Kiel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Programmatically adjusting NSValueTransformer of a bound NSTextField (From: Kiel Gillard <email@hidden>)

  • Prev by Date: No Driver Dependencies
  • Next by Date: WebView in NSTabView
  • Previous by thread: Programmatically adjusting NSValueTransformer of a bound NSTextField
  • Next by thread: No Driver Dependencies
  • Index(es):
    • Date
    • Thread