It is documented that way here:

    
https://leoeditor.com/scripting-miscellany.html#invoking-commands-from-scripts

So maybe things have changed...

On Wednesday, December 22, 2021 at 8:25:54 PM UTC [email protected] wrote:

> Did this work in the past?  The call signature doesn't match your usage.  
> Here is the signature of *doCommand*, from PyLeoRef -
>
> def doCommand(self, command_func, command_name, event):
>
> You could just call c.copyOutline() directly, without invoking 
> c.doCommand(). 
> On Tuesday, December 21, 2021 at 9:14:41 PM UTC-5 Phil wrote:
>
>> In an @button node I have the following text:
>>       c.doCommand(c.copyOutline, label='Copy Node')
>>
>> When I click the button, I get the error below:
>>
>> exception executing script
>> TypeError: doCommand() got an unexpected keyword argument 'label'
>>
>> --------------------
>>   line 2: #@+node:phil.20200202134614.6: * @button Copy Node
>> * line 3: c.doCommand(c.copyOutline, label='Copy Node')
>>   line 4: #@-leo
>>   line 5: 
>>
>> I am running this:
>>
>> Leo 6.6b2-devel, devel branch, build f85969ae8c
>> 2021-12-21 06:16:01 -0600
>> Python 3.7.3, PyQt version 5.12.4
>> linux
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7e72816f-696e-477a-8f1b-e2dc585b8f8an%40googlegroups.com.

Reply via email to