Poor Design? Re: controlTextDidChange, backspace possible?
Poor Design? Re: controlTextDidChange, backspace possible?
- Subject: Poor Design? Re: controlTextDidChange, backspace possible?
- From: Daniel Todd Currie <email@hidden>
- Date: Tue, 14 Sep 2004 12:54:49 -0700
I've read your previous message to Uli, and still I don't understand
why this would be poor design... I think it makes perfect sense to
encapsulate field length limits in the field itself. Neither the
controller nor the model should have any interest in this value, so why
burden them with it?
I personally like to have a sort of built-in data handler for my more
complicated UI elements. The element handles formatting and
interpretation, and only provides the controller what it needs.
Another example of this is an NSPopUpButton subclass I used in two of
my apps. When the user clicks on the popup button, it polls CoreAudio
for a list of available audio devices, populates the menu, THEN
presents the user with the menu. This is a simple way of handling the
issue of a dynamic device list at the last possible instant before it
needs to be presented to the user. Furthermore, the controller and the
model don't care in the slightest what devices are available, only what
device is selected.
-- DTC
On 2004 Sep 14, at 10:25, Ondra Cada wrote:
On 14.9.2004, at 17:52, Peter Karlsson wrote:
Why don't have a field in IB where I just type 32 for length, period!
For it would be a *pretty bad* design, perhaps? See my previous
message for Uli.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden