Ed leNoir
2005-02-22 03:16:36 UTC
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
(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