Is NSNotification from NSStepper possible

  • Hi, I'm trying to create the following behavior. When a user clicks
    on the NSStepper (to change the value of the targeted NSTextField), I
    want the NSStepper to post a Notification so I can delegate it to
    another selector who then updates other NSTextFields in the same
    NSTabView. I'm currently able to receive
    NSControlTextDidEndEditingNotification and
    NSControlTextDidChangeNotification from the NSTextField but not
    NSStepper. The NSStepper docs doesn't mention Notifications. If
    NSStepper doesn't support NSNotification, any suggestion on how to
    achieve this desired behavior?

    This is a single-thread universal app built using XCode 2.4 with
    10.4u SDK on a PPC.

    Thanks in advance
    Chris
  • One way that comes to mind is this:

    Bind the NSStepper to a value, and have a change in that value
    trigger a notification. Look in the Currency Converter using Bindings
    tutorial for an example of that: http://developer.apple.com/
    documentation/Cocoa/Conceptual/CurrencyConverterBindings/
    02creatingproj/chapter_2_section_1.html

    There might be a simpler way, but without knowing more about what's
    in your textfields and how it relates to the stepper value, I'm not
    sure what that would be.

    Hank

    On Oct 19, 2006, at 1:59 PM, Chris wrote:

    > Hi, I'm trying to create the following behavior. When a user clicks
    > on the NSStepper (to change the value of the targeted NSTextField),
    > I want the NSStepper to post a Notification so I can delegate it to
    > another selector who then updates other NSTextFields in the same
    > NSTabView. I'm currently able to receive
    > NSControlTextDidEndEditingNotification and
    > NSControlTextDidChangeNotification from the NSTextField but not
    > NSStepper. The NSStepper docs doesn't mention Notifications. If
    > NSStepper doesn't support NSNotification, any suggestion on how to
    > achieve this desired behavior?
    >
    > This is a single-thread universal app built using XCode 2.4 with
    > 10.4u SDK on a PPC.
    >
    > Thanks in advance
    > Chris
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<hankh...>
    >
    > This email sent to <hankh...>
    >

    Hank Heijink
    www.hankheijink.com
    <hankh...>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today