FROM : Brian Webster
DATE : Fri Dec 13 16:18:36 2002
On Friday, December 13, 2002, at 12:15 AM, Brad Oliver wrote:
> On 12/12/02 11:45 PM, "Brian Webster" <<email_removed>> 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_removed>
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Fri Dec 13 16:18:36 2002
On Friday, December 13, 2002, at 12:15 AM, Brad Oliver wrote:
> On 12/12/02 11:45 PM, "Brian Webster" <<email_removed>> 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_removed>
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Brad Oliver | Dec 13, 00:13 | |
| matt neuburg | Dec 13, 03:33 | |
| Brian Webster | Dec 13, 06:45 | |
| Brad Oliver | Dec 13, 07:15 | |
| ssudre2 | Dec 13, 09:21 | |
| Brian Webster | Dec 13, 16:18 | |
| Jonathan E. Jackel | Dec 13, 16:54 |






Cocoa mail archive

