Re: NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-29 Thread Paul Johnson
Quincy Morisses reply completely resolved the issue I was having with bindings. I realized that we exchanged emails without copying this board. I think Quincy's reply might be helpful to others, so I'm reposting his reply on this board: On May 28, 2013, at 16:25 , Paul Johnson wrote: Thanks, Qui

Re: NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-28 Thread Quincey Morris
On May 28, 2013, at 13:16 , Paul Johnson wrote: > I have a slider, a stepper, and a textField that are synchronized using > bindings. I didn't write any code to do this, just used Xcode with its > Interface Builder. When the program starts I don't see the slider set to > the "Current" position I'

NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?

2013-05-28 Thread Paul Johnson
I have a slider, a stepper, and a textField that are synchronized using bindings. I didn't write any code to do this, just used Xcode with its Interface Builder. When the program starts I don't see the slider set to the "Current" position I'd like and the textField doesn't show the "Current" value

Re: Was: Re: NSStepper - useless?

2012-02-26 Thread John Joyce
d max. If that > value can't be determined then the control will appear incorrectly, and > controls have no way to "ask" the data model for a value - it's up to the > relevant controller to push the value to the control. > > Since all controls work that way, w

Re: Was: Re: NSStepper - useless?

2012-02-26 Thread Seth Willits
On Feb 26, 2012, at 4:44 PM, William Squires wrote: >>> Why didn't they just make the NSStepper a custom view that draws two >>> arrows, and has two sent actions that you can connect? Or even a variation >>> of NSMatrix with two button cells that look like a

Re: Was: Re: NSStepper - useless?

2012-02-26 Thread Graham Cox
ax. If that value can't be determined then the control will appear incorrectly, and controls have no way to "ask" the data model for a value - it's up to the relevant controller to push the value to the control. Since all controls work that way, why should NSStepper be an ex

Re: Was: Re: NSStepper - useless?

2012-02-26 Thread William Squires
On Feb 23, 2012, at 2:13 PM, Seth Willits wrote: > On Feb 23, 2012, at 6:16 AM, William Squires wrote: > >> From what I've read, the NSStepper has a bug (though practically, you'll >> never see it); if one were to click the up or down arrow on the control 2^32 >

NSStepper

2012-02-25 Thread Dale Miller
On Thu, Feb 23, 2012 at 6:16 AM, William Squires wrote: From what I've read, the NSStepper has a bug (though practically, you'll never see it); if one were to click the up or down arrow on the control 2^32 times (assuming it's value is a 4-byte signed int,and is initia

Re: Was: Re: NSStepper - useless?

2012-02-24 Thread Gregory Weston
William Squires wrote: > Why didn't they just make the NSStepper a custom view that draws two arrows, > and has two sent actions that you can connect? Or even a variation of > NSMatrix with two button cells that look like arrows. That would avoid the > problem entirely, and

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Keary Suska
On Feb 23, 2012, at 10:05 AM, Kyle Sluder wrote: > On Thu, Feb 23, 2012 at 6:16 AM, William Squires wrote: >> From what I've read, the NSStepper has a bug (though practically, you'll >> never see it); if one were to click the up or down arrow on the control 2^32 >

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Seth Willits
On Feb 23, 2012, at 6:16 AM, William Squires wrote: > From what I've read, the NSStepper has a bug (though practically, you'll > never see it); if one were to click the up or down arrow on the control 2^32 > times (assuming it's value is a 4-byte signed int,and is initia

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Kyle Sluder
On Thu, Feb 23, 2012 at 6:16 AM, William Squires wrote: > From what I've read, the NSStepper has a bug (though practically, you'll > never see it); if one were to click the up or down arrow on the control 2^32 > times (assuming it's value is a 4-byte signed int,and is

Was: Re: NSStepper - useless?

2012-02-23 Thread William Squires
>From what I've read, the NSStepper has a bug (though practically, you'll never >see it); if one were to click the up or down arrow on the control 2^32 times >(assuming it's value is a 4-byte signed int,and is initialized to 0), it would >wrap around (or raise an exc

Re: NSStepper - useless?

2012-02-23 Thread Martin Hewitson
On Feb 22, 2012, at 09:11 PM, Seth Willits wrote: > On Feb 19, 2012, at 4:11 PM, William Squires wrote: > >> Okay, 'nuther dumb question. How do I hook the different arrows in an >> NSStepper to actions in my view controller? Or how do I ask (id)sender which >>

Re: NSStepper - useless?

2012-02-23 Thread John Joyce
On Feb 19, 2012, at 6:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? > Remember that classes tend to inherit from

Re: NSStepper - useless?

2012-02-23 Thread Jens Alfke
On Feb 19, 2012, at 4:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? NSStepper is intended to keep track of the value for yo

Re: NSStepper - useless?

2012-02-23 Thread Keary Suska
On Feb 19, 2012, at 5:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? You can't, at least not specifically, on both coun

Re: NSStepper - useless?

2012-02-22 Thread Graham Cox
On 20/02/2012, at 11:11 AM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? You can't, it works differently. Instead it has a

Re: NSStepper - useless?

2012-02-22 Thread Fritz Anderson
On 19 Feb 2012, at 6:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? It's not useless, it just doesn't have the use

Re: NSStepper - useless?

2012-02-22 Thread Seth Willits
On Feb 19, 2012, at 4:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? You don't. You ask for the stepper's v

NSStepper - useless?

2012-02-22 Thread William Squires
Okay, 'nuther dumb question. How do I hook the different arrows in an NSStepper to actions in my view controller? Or how do I ask (id)sender which arrow was clicked? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: responding to NSStepper clicks

2011-12-18 Thread Mike Abdullah
On 18 Dec 2011, at 17:08, Koen van der Drift wrote: > Just to be sure I'm doing this correctly in my code I extract the number from > my textfield and stepper as follows: > > NSUInteger index = [ indexTextField integerValue]; > > and/or > > NSUInteger index = [indexStepper integerValue];

Re: responding to NSStepper clicks

2011-12-18 Thread Koen van der Drift
el. Xcode autocompletes the >> correct property, so I'm not sure what to do with this, since everything >> works. I don't see that exclamation mark in the NSStepper bindings field. > > Put a formatter in and see what happens. Thanks, I'll look at adding a for

Re: responding to NSStepper clicks

2011-12-18 Thread Mike Abdullah
using it! > > I also see a small exclamation mark (white on a red circle), in the Model Key > Path bindings field, where I bind to my model. Xcode autocompletes the > correct property, so I'm not sure what to do with this, since ev

Re: responding to NSStepper clicks

2011-12-17 Thread Peter
Here is a simple tutorial by a list member of ours: http://juliuspaintings.co.uk/cgi-bin/paint_css/animatedPaint/059-NSStepper-NSTextField.pl This example uses an object controller but can be reconfigured to bypass it and bind to an ivar easily. Even though it uses a number formatter besides

Re: responding to NSStepper clicks

2011-12-17 Thread Koen van der Drift
ce everything works. I don't see that exclamation mark in the NSStepper bindings field. - Koen. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Re: responding to NSStepper clicks

2011-12-16 Thread Quincey Morris
quot;a message", it's an exception. Your app crashed -- crashed nicely, that's all. Until you've fixed the exception, you don't know if the misbehavior of the text field is significant. > Is there some (Apple) sample code that shows how to use a > NSTextField/NSSteppe

Re: responding to NSStepper clicks

2011-12-16 Thread Koen van der Drift
at 10:50 AM, Koen van der Drift >> wrote: >>> On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah >>> wrote: >>> >>>> NSStepper is a subclass of NSControl. Hook up its action/target to be >>>> notified when it's adjusted. >>> &g

Re: responding to NSStepper clicks

2011-12-16 Thread Koen van der Drift
16 Dec 2011, at 12:59, Koen van der Drift wrote: > >> On Thu, Dec 15, 2011 at 10:50 AM, Koen van der Drift >> wrote: >>> On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah >>> wrote: >>> >>>> NSStepper is a subclass of NSControl. Hook up its act

Re: responding to NSStepper clicks

2011-12-16 Thread Mike Abdullah
0:17 AM, Mike Abdullah >> wrote: >> >>> NSStepper is a subclass of NSControl. Hook up its action/target to be >>> notified when it's adjusted. >> >> I'll try that, thanks. Using bindings sometimes makes you forget that >> there is still some c

Re: responding to NSStepper clicks

2011-12-16 Thread Koen van der Drift
;> On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah >>> wrote: >>> >>>> NSStepper is a subclass of NSControl. Hook up its action/target to be >>>> notified when it's adjusted. >>> >>> I'll try that, thanks.  Using bindings som

Re: responding to NSStepper clicks

2011-12-16 Thread Peter
Am 16.12.2011 um 13:59 schrieb Koen van der Drift: > On Thu, Dec 15, 2011 at 10:50 AM, Koen van der Drift > wrote: >> On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah >> wrote: >> >>> NSStepper is a subclass of NSControl. Hook up its action/target to be

Re: responding to NSStepper clicks

2011-12-16 Thread Koen van der Drift
On Thu, Dec 15, 2011 at 10:50 AM, Koen van der Drift wrote: > On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah > wrote: > >> NSStepper is a subclass of NSControl. Hook up its action/target to be >> notified when it's adjusted. > > I'll try that, thanks.  Usin

Re: responding to NSStepper clicks

2011-12-15 Thread Koen van der Drift
On Thu, Dec 15, 2011 at 10:17 AM, Mike Abdullah wrote: > NSStepper is a subclass of NSControl. Hook up its action/target to be > notified when it's adjusted. I'll try that, thanks. Using bindings sometimes makes you forget that there is still some cdong n

Re: responding to NSStepper clicks

2011-12-15 Thread Mike Abdullah
NSStepper is a subclass of NSControl. Hook up its action/target to be notified when it's adjusted. On 15 Dec 2011, at 13:16, Koen van der Drift wrote: > I've set up an NSStepper/NSTextField combination to control myInt in > my model. I have bound the value of myInt to both out

responding to NSStepper clicks

2011-12-15 Thread Koen van der Drift
I've set up an NSStepper/NSTextField combination to control myInt in my model. I have bound the value of myInt to both outlets, and when I click the stepper, the value of myInt in the textfield changes accordingly. All good. I've set up the delegate controlTextDidChange, and my model ch

Re: Interpreting action from NSStepper

2009-05-12 Thread Graham Cox
On 13/05/2009, at 9:47 AM, David Alter wrote: When a user clicks on my stepper my action method gets called. How can I identify if the user is clicking the up arrow or the down arrow Thanks for the help Steppers don't work like that. They have a value, like a slider. The value gets increm

Interpreting action from NSStepper

2009-05-12 Thread David Alter
When a user clicks on my stepper my action method gets called. How can I identify if the user is clicking the up arrow or the down arrow Thanks for the help -dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: Simulating a click in NSStepper

2009-04-16 Thread Nick Zitzmann
On Apr 16, 2009, at 3:13 PM, David Alter wrote: I'm using a NSStepper with the little up and down arrows. I want to simulate a click where the correct arrow will get highlighted as if someone clicked into it. I'm unclear how I should do this. I can do a perform click but that

Simulating a click in NSStepper

2009-04-16 Thread David Alter
I'm using a NSStepper with the little up and down arrows. I want to simulate a click where the correct arrow will get highlighted as if someone clicked into it. I'm unclear how I should do this. I can do a perform click but that does not specify what arrow to click. Any suggestions?

Palette a NSStepper with tow Buttons and a NSTextField

2008-05-07 Thread 王仕俊
Hi,all I know NSStepper provided by Interface builder. But now I need to setImage like NSButton for a NSStepper, so I use two buttons and a textFiled to make my stepper. and another problem, I need make my stepper as a palette. How should I do? Many thanks