[chirp_devel] Quick Multi-bank editor

Jon Kåre Hellan
Mon May 23 23:14:51 PDT 2011


On 05/24/2011 07:56 AM, Jon Kåre Hellan wrote:
> On 05/24/2011 12:21 AM, Dan Smith wrote:
>>> def make_cb(i):
>>> def cb(members):
>>> self._bank_members[i] = members
>>> return cb
>>
>> Can you explain this change?
>>
>
> 'i' was always the number of the last bank when cb was called. Looks
> like 'cb' got redefined with a new 'i' for each iteration.
>

i.e. all the threads which use 'cb' executed *after* the last iteration, 
and used the definition of 'i' which corresponds to the last bank.

Regards

Jon LA4RT




More information about the chirp_devel mailing list