• 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: NSStepper and NSTextField changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStepper and NSTextField changes


  • Subject: Re: NSStepper and NSTextField changes
  • From: Brian Webster <email@hidden>
  • Date: Fri, 13 Dec 2002 09:18:36 -0600

On Friday, December 13, 2002, at 12:15 AM, Brad Oliver wrote:

On 12/12/02 11:45 PM, "Brian Webster" <email@hidden> wrote:

Yes, that appears to match what I have discovered. This seems
counter-intuitive to me as I'm not interested in the value of the stepper,
and in general I'm hard-pressed to think of a situation where I would be, in
lieu of the value of the control the stepper modifies. In my case, I'm only
interested in the text field.

I think the root of the confusion comes from the fact that the various takeXValueFrom: actions are rarely ever used in real applications. IMHO, their use should be discouraged because their use typically doesn't follow the MVC paradigm, the theory being that performing a UI action should change data somewhere down in the model layer (via the controller), rather than simply changing a value in another element in the view layer. Their main reason for existence seems to be for demoing Interface Builder, so you can hook up a slider to a text field and drag it back and forth and watch the pretty numbers change without writing any code. Of course it would have been helpful to know this before setting up 600 connections in Interface Builder. :-)

I'm also boggled that changing the text field through means other than
direct user input doesn't provide a notification of any kind. It would seem
to me that the stepper modification case would be fairly common.

Again, at least the way I've always done things, I set up notifications to fire when the model layer is changed. Any change to the view layer will either be performed by the user or by my controller, in response to a change in the model layer. I guess the moral of the story is that Cocoa is very nice to use once you know what it expects you to do. ;-)

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • RE: NSStepper and NSTextField changes
      • From: "Jonathan E. Jackel" <email@hidden>
References: 
 >Re: NSStepper and NSTextField changes (From: Brad Oliver <email@hidden>)

  • Prev by Date: Re: Cursors request and offer
  • Next by Date: Re: UInt64ToLongDouble
  • Previous by thread: Re: NSStepper and NSTextField changes
  • Next by thread: RE: NSStepper and NSTextField changes
  • Index(es):
    • Date
    • Thread