• 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: Shared NSNumberFormatters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared NSNumberFormatters


  • Subject: Re: Shared NSNumberFormatters
  • From: Samuel Williams <email@hidden>
  • Date: Sat, 29 Sep 2012 13:46:03 +1200

Binding the formatter's currencyCode worked brilliantly and lets me reuse
almost all the existing NIBs without change. Thanks =)

On 29 September 2012 02:28, Sean McBride <email@hidden> wrote:

> On Sat, 29 Sep 2012 01:37:58 +1200, Samuel Williams said:
>
> >Hi Friends,
> >
> >I have an application that is currency using multiple NSNumberFormatters.
> >
> >Now a requirement has come up to support a per-document currency code.
> >
> >I have about 10 NIB files and the most complex NIB files have about 10-15
> >fields using per-NIB file formatters connected to fields using outlets.
> >
> >I would ideally like to use a binding on the text fields, e.g. bind
> >formatter to File's Owner document.currencyNumberFormatter but
> >unfortunately this binding isn't exposed in Xcode, which is leading to
> >quite a bit of additional code to manually create this binding.
>
> You can place your NSFormatters are the top-level of your nib and connect
> your textfield's 'formatter' outlet to them, and also create outlets in
> your window/view controller to the same formatters.  formatters are
> mutable, so you can configure them how you want in windowWillLoad or
> awakeFromNib or whereever.
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 email@hidden
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
_______________________________________________

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: 
 >Shared NSNumberFormatters (From: Samuel Williams <email@hidden>)
 >Re: Shared NSNumberFormatters (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: NSPredicate / NSArray addObserver:forKeyPath:options:context: exception
  • Next by Date: The joy of unexpected SIGABRTs
  • Previous by thread: Re: Shared NSNumberFormatters
  • Next by thread: Notification Center settings
  • Index(es):
    • Date
    • Thread