<p dir="ltr">Den 15 juni 2016 5:45 em skrev "David Gobbi" <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>>:<br>
><br>
> On Wed, Jun 15, 2016 at 9:30 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> On Wed, Jun 15, 2016 at 9:27 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>><br>
>>> On Wed, Jun 15, 2016 at 7:51 AM, Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> I noticed in QVTKRenderWindowInteractor that it returns 1 in the callback it sets up for DestroyTimerEvent:<br>
>>>><br>
>>>>     def DestroyTimer(self, obj, evt):<br>
>>>>         self._Timer.stop()<br>
>>>>         return 1<br>
>>>><br>
>>>> So I suspect callbacks for this event are expected to return something. But I can't find any info in the docs on which event callbacks are expected to return something (and what), and which are not. Is this info available somewhere?<br>
>>><br>
>>><br>
>>> I checked the code for the Execute command in vtkPythonCommand.cxx, and the return value for callbacks is ignored.  So I'm not sure why this callback returns a value.  Prabhu might remember (he wrote the function), but that was way back in 2002.  It was probably a simple mistake due to cut-and-paste.<br>
>>><br>
>>> If anything, a non-negative return value would indicate that the callback had aborted, e.g. that the callback did not complete whatever action it was meant to perform.  But obviously that's not the intent for this method.<br>
>><br>
>><br>
>> Small typo in the above: I meant non-zero, not non-negative.<br>
><br>
><br>
> Actually, please completely ignore the second paragraph that I wrote, it just muddies what should be a clear statement:<br>
><br>
> When you use VTK events in python, the callback's return value is ignored.</p>
<p dir="ltr">Excellent. I had my suspicion it might have been a mistake, thanks for doing the digging.</p>
<p dir="ltr">Elvis</p>
<p dir="ltr">><br>
>  - David<br>
><br>
><br>
</p>