Re: number formatter

2017-05-25 Thread Richard Charles
> On May 25, 2017, at 3:03 AM, J.E. Schotsman wrote: > > In this case the order did matter. > Maybe this is because IB expects NSFormatter for a formatter outlet, not > Formatter? I just tried this with a new project in Xcode 8.3.2. With Objective-C the order does not matter. With Swift the

Re: number formatter

2017-05-25 Thread J.E. Schotsman
> On 24 May 2017, at 19:53, Richard Charles wrote: > > Actually the order does not matter. You should be able to make the connection > before or after you change the formatter class to your custom class. In this case the order did matter. Maybe this is because IB expects NSFormatter for a form

Re: number formatter

2017-05-24 Thread Richard Charles
> On May 24, 2017, at 11:08 AM, J.E. Schotsman wrote: > >> On 24 May 2017, at 18:51, Richard Charles wrote: >> >> In other words the nib or xib should already contain the formatter, if not >> then create one. Connect the formatter to your control as you normally >> would. Then set the class

Re: number formatter

2017-05-24 Thread J.E. Schotsman
> On 24 May 2017, at 18:51, Richard Charles wrote: > > In other words the nib or xib should already contain the formatter, if not > then create one. Connect the formatter to your control as you normally would. > Then set the class of the formatter to your custom class. Indeed, this works. Fi

Re: number formatter

2017-05-24 Thread Richard Charles
> On May 24, 2017, at 9:30 AM, J.E. Schotsman wrote: > > Hello > > I have written the simplest of formatters: > > class MyIntNumberFormatter:NumberFormatter > { > override init() > { > super.init() > hasThousandSeparators = false >

Re: Number formatter errors

2015-04-01 Thread Shane Stanley
On 2 Apr 2015, at 3:41 am, Sean McBride wrote: > > Do you have 'validates immediately' on? No -- I didn't actually have a binding at that stage, which is why I wasn't seeing the result I expected. I'd missed the fact that bindings were the driver of the error dialog. -- Shane Stanley __

Re: Number formatter errors

2015-04-01 Thread Sean McBride
On Wed, 1 Apr 2015 13:33:15 +1100, Shane Stanley said: >I start a new project, then drag a text field with attached number >formatter into the window. I set the formatter's minimum to 0 and >maximum to 1. I run, then enter 3 and hit return. I get a beep, but no >error dialog. Yet I have existing p

Re: Number formatter errors

2015-03-31 Thread Shane Stanley
On 1 Apr 2015, at 1:33 pm, Shane Stanley wrote: > > I'm sure I'm missing something simple, but it's escaping me. Yep. Bindings. -- Shane Stanley ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Re: Number Formatter Default Value (or combo box?)

2013-03-15 Thread Seth Willits
On Mar 15, 2013, at 6:38 PM, Quincey Morris wrote: >> Am I wrong on that? I don't think I am, so I guess I'll keep on trucking >> with the above code. > > The only thing that springs to mind is that *perhaps* it's more correct to > think of the formatter as a validator of input structure, rathe

Re: Number Formatter Default Value (or combo box?)

2013-03-15 Thread Quincey Morris
On Mar 15, 2013, at 18:07 , Seth Willits wrote: > So my questions: > > 1) I see no way for a combo box to have a "default value" if say the > formatter returns nil > 2) I see no way for a formatter to have a "default value" if it can't convert > a value. > > > Am I wrong on that? I don't thi

Re: Number Formatter

2009-01-21 Thread Alex Kac
Ah, I was thinnking of Number Pad. But if you need Numbers and Punctuation, just implement the delegate textField:shouldChangeCharactersInRange:replacementString: and make sure the only characters are numbers. On Jan 21, 2009, at 2:13 PM, Brooke Gravitt wrote: On Wed, Jan 21, 2009 at 3:0

Re: Number Formatter

2009-01-21 Thread Brooke Gravitt
On Wed, Jan 21, 2009 at 3:04 PM, Alex Kac wrote: > Check the Numbers only flag in the IB palette. > So my options are ( if I'm looking in the right place ) on the Text Field Attributes tab on the inspector, Text Input Traits panel Keyboard Type: Default ASCII Capable

Re: Number Formatter

2009-01-21 Thread Alex Kac
Check the Numbers only flag in the IB palette. On Jan 21, 2009, at 1:57 PM, Brooke Gravitt wrote: On Wed, Jan 21, 2009 at 2:50 PM, Alex Kac wrote: If you're on the iPhone, there is no IB formatters. I only mention that because of your comment about touch input. There we go! So any idea ho

Re: Number Formatter

2009-01-21 Thread Alex Kac
If you're on the iPhone, there is no IB formatters. I only mention that because of your comment about touch input. On Jan 21, 2009, at 1:21 PM, Brooke Gravitt wrote: On Wed, Jan 21, 2009 at 12:44 PM, Peter Hudson wrote: In IB in the Library panel, just below half way down there is a sym