Re: Zwei ArrayField Fragen: Feldzugriff und Fehler bei ImageField

"Jens W. Klein" <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization Klein & Partner KEG, BlueDynamics Alliance
Message-ID <1241699587.16225.219.camel@minime>
Am Donnerstag, den 07.05.2009, 13:58 +0200 schrieb Raphael Ritz:
[...] 
> > In Products.Archetypes.BaseObject.py Zeile 318 steht in getContentType() 
> > folgender Code:
> > 
> > if field and shasattr(field, 'getContentType'):
> >     return field.getContentType(self)
> > 
> > Wenn ich aus dieser Zeile
> > 
> >   try: return field.getContentType(self)
> >   except: return field.getContentType()
> > 
> > mache, klappt alles wunderbar. Ich weiss leider nicht, ob das ein Bug 
> > ist, oder ob ich etwas übersehen habe.

also komisch ist das schon, da weder Compound- noch das von diesem
erbende ArrayField diese Methode überschriebt. Falls notwendig können
wir das ja gerne machen. Wobei dann zumindest beim ArrayField fraglich
ist, was ein sinnvoller Rückgabewert ist. Beim CompoundField könnte man
das primary field des Subschemas befragen.

> Funktionieren normale Text- und Filefelder dann noch?

ich denke nicos patch ist da neutral.

> Wenn mich nicht alles täuscht, brauchen die das.

naja, die felder haben das ja auch drauf, oder? Nico patched ja
BaseObject.

> Definiert denn das ArrayField eine eigene 'getContentType'
> Methode mit incompatibler Signatur? 

Nein.

> Wenn ja, wuerde ich
> die patchen.

gruss Jens
-- 
Jens Klein
Software Architect
Managing Director, General Partner
+43 512 890077

BlueDynamics Alliance        WEB APPLICATIONS,  ZOPE,  PLONE, HOSTING
Klein & Partner KEG          production: concept, development, design
http://bluedynamics.com      consulting: analysis, coaching, training
http://zoplo.com             management: projects, process, community



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.