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 <s...@rogue-research.com> 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                 s...@rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to