Kiwi Label value mapping
aafshar at gmail.com
Mon Oct 29 21:07:38 BRST 2007
Well, although it's close, I think it's a model thing not view. View
renders the actual data, model should decide what the view renders.
What's right and wrong though is a bit irrelevant, since it works
well, is simple to understand, and is very maintainable.
Let me give an example. What happens when you want to create a web
view for the same model. Surely it would be useful to not have to
reimplement the accessor for each type of view?
On 29/10/2007, Lucas Di Pentima <lucas at di-pentima.com.ar> wrote:
> 2007/10/29, Ali Afshar <aafshar at gmail.com>:
> > Well, it's the official Python way of doing it I guess. The automatic
> > accessor call is a relic and hopefully will vanish at some point. The
> > property is far more explicit, and you can use it in situations where
> > kiwi will not automatically call the accessor.
> And what about different "visual representations" of the same property
> on different Delegates? With custom accessors or properties, we modify
> the way some model property looks, but I think that's a View job, why
> we have to modify the model for that?
> I think that ProxyLabel should have some method to establish "value
> mapping" instance wise, just like the replace() method, what do you
> Best regards
> Lucas Di Pentima - http://lucas.di-pentima.com.ar
> GnuPG Public Key:
> Key fingerprint = BD3B 08C4 661A 8C3B 1855 740C 8F98 3FCF 6AA5 4FC9
More information about the Kiwi