support for lists

"Ed leNoir" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <012c01c5188c$eb94c210$1b02a8c0@gonzalez>
I lost quite a bit of time today working with a new list in a protocol.  The pm325 has the speed dials in the protocol, and it's handled just like the number types in the vx4400.  Unfortunately I didn't locate the special handling for lists in the phones "makeentry" routine - I would have thought the lists were self sufficient.  The error raised is that the sub item in the list is sent the entire array, and not just nth element.  Here's the code from the com_ portion:

(part of makeentry)
        e=self.protocolclass.pbentry()
        e.entrynumber=counter
        
        for k in entry:
            # special treatment for lists
            if k in ('emails', 'numbers', 'numbertypes'):
                l=getattr(e,k)
                for item in entry[k]:
                    l.append(item)

I was thinking that protogen should have generated code to handle the arrays.  Is this something I should pursue, or has there been debate before?

- Ed
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.