[jToolkit-cvs] jToolkit/widgets table.py,1.3,1.4
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2004-02-09 13:59:08
|
Update of /cvsroot/jtoolkit/jToolkit/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6901 Modified Files: table.py Log Message: convertedTable.getcontents to produce list of tags and join them (this allows for unicode/str type checking) Index: table.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/widgets/table.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** table.py 25 Sep 2003 17:36:55 -0000 1.3 --- table.py 9 Feb 2004 13:55:54 -0000 1.4 *************** *** 115,122 **** def getcontents(self): ! htmlstring = "" ! for rownum in self.rowrange(): #Now the elements of the toolbar ! htmlstring += self.getrowcontents(rownum) ! return htmlstring def rowempty(self, rownum): --- 115,126 ---- def getcontents(self): ! contentslist = [self.getrowcontents(rownum) for rownum in self.rowrange()] ! # TODO: investigate ways to neaten this up while still preventing ASCII decoding error... ! typelist = [type(p) for p in contentslist] ! if unicode in typelist and str in typelist: ! for n in range(len(contentslist)): ! if type(contentslist[n]) == str: ! contentslist[n] = contentslist[n].decode('iso8859') ! return "".join(contentslist) def rowempty(self, rownum): |