Problemas con listas de objetos

Cesar Cardenas cescd en yahoo.com.mx
Mie Abr 23 19:46:40 CEST 2003


Según veo, estás usando un objeto posting. Estuve
revisando los metodos de la clase Posting, y por tu
codigo veo

- Que la parte que funciona es porque le estas pasando
un string
- La parte que no funciona es porque la clase Posting
no tiene un metodo addPosting(<Squishfile>)

http://squishdot.org/932098184/index_html
http://209.181.77.58/openidea/oip_wiki/SquishdotClasses

Lo que podrias hacer para agregarlos es usando el
unico metodo disponible en la clase Posting para
agregar comentarios:

def
addPosting(self,title,author,body,email='',notify='',file='',
                  REQUEST=None,RESPONSE=None):     
        """ add a reply """     

> def addFile(posting,file):
>     f  = createUploadable(file)
>     sf = Squishfile(f)
>     posting.file = sf
>     setattr(posting,sf.file_name(),sf)
>     posting.attachment_cnt=posting.attachment_cnt+1
>     posting.file_array.append(sf)
> 
> No me introduce el objeto correctamente, sin
> embargo, si hago:
> 
>     posting.file_array.append(sf.file_name())
> 


_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx




Más información sobre la lista de distribución Python-es