• 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: Sean McBride <email@hidden>
  • Date: Fri, 28 Sep 2012 10:28:13 -0400
  • Organization: Rogue Research Inc.

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


  • Follow-Ups:
    • Re: Shared NSNumberFormatters
      • From: Samuel Williams <email@hidden>
References: 
 >Shared NSNumberFormatters (From: Samuel Williams <email@hidden>)

  • Prev by Date: Re: Need some clarity about iOS developer Registration.
  • Next by Date: Re: Registering iOS developer program
  • Previous by thread: Shared NSNumberFormatters
  • Next by thread: Re: Shared NSNumberFormatters
  • Index(es):
    • Date
    • Thread