kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #27225
Re: Current state of ActionPlugin
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Mon, 16 Jan 2017 14:14:10 -0500
-
In-reply-to:
<CAJQyTMBJEYN=LWxrKS1xdSZ08eirXZhnaWO_ZdSy7RjLwL1OnA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
Yes. This is a useful piece of information in case we suddenly get a
rash of python scripting bug reports.
On 1/16/2017 2:15 PM, Simon Wells wrote:
> Should this option be added to the about box->copy version info for
> completeness?
>
> On Tue, Jan 17, 2017 at 8:08 AM, Jean-Samuel Reynaud
> <js.reynaud@xxxxxxxxx> wrote:
>> Hi all,
>>
>> Please find attached the patch for the action plugin menu.
>>
>> There is a build option to enable/disable this feature:
>> KICAD_SCRIPTING_ACTION_MENU
>> => It's disabled by default
>>
>> Now there is a refresh button. It took new plugins, update existing ...
>> like in footprint wizard dialog.
>>
>> I had remove the example from the patch as asked.
>>
>> Regards,
>> Le 11/01/2017 à 18:58, jp charras a écrit :
>>> Le 11/01/2017 à 17:36, Jean-Samuel Reynaud a écrit :
>>>>>> Pay a particular attention to the fact plugins can be *now* updated (when the source file has
>>>>>> changed), and therefore menus can also be updated.
>>>>>> the "PCB_EDIT_FRAME::createActionPluginMenus()" method calls Connect, but Disconnect is never called
>>>>>> by destructors.
>>>>>> It can create issues when updating scripts, because it could be called more than once.
>>>>>
>>>>> If you need to update the menus when a script file changes, you would
>>>>> have to connect a wxFileWatcherEvent to the appropriate wxMainFrame
>>>>> object to monitor the loaded script file and update the menus
>>>>> accordingly. It can be done but I would proceed with caution here.
>>>>>
>>>> Is it really necessary to add a file watcher ? Once python plugins are
>>>> loaded, python subsystem run the plugin as it was at start time (As I
>>>> understand).
>>>> I had perform a little test for that. If you modify a plugin while
>>>> pcbnew is running, this is always the "old" version that is running. Not
>>>> sure that is true for all OS...
>>>
>>> I am thinking you are talking only about tests on footprint wizards.
>>>
>>> On Windows, the newer is reloaded (as long as you run onUpdatePythonModulesClick).
>>> This is easy to see if the description string in the footprint plugin is modified.
>>>
>>>> So menu are not supposed to change even if file change.
>>>> An other point: if I implement that file watching, I should also
>>>> implement a "directory watcher". In case a new plugins is installed
>>>> during pcbnew is running ;)
>>>> Perhaps an "update button": like onUpdatePythonModulesClick for
>>>> footprint plugins ?
>>>
>>> From my experience when debugging a footprint wizard module:
>>> An "update button" is certainly enough: it is mainly for python script developers when they are
>>> writing and debugging a python script, not for an user who just uses a script.
>>> An automatic update is not useful, and perhaps not good.
>>>
>>> The update button was asked since a long time, and I perfectly understand this wish.
>>> (The old way was: closing and rerun kicad)
>>> It is intended to reload python modules during their development.
>>>
>>> Remark: onUpdatePythonModulesClick updates all loaded python modules.
>>> Of course only python modules which are newer than the currently loaded are reloaded.
>>> Therefore onUpdatePythonModulesClick will also update the action plugins.
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References
-
Re: Current state of ActionPlugin
From: Wayne Stambaugh, 2017-01-04
-
Re: Current state of ActionPlugin
From: Nick Østergaard, 2017-01-09
-
Re: Current state of ActionPlugin
From: Jean-Samuel Reynaud, 2017-01-10
-
Re: Current state of ActionPlugin
From: Maciej Sumiński, 2017-01-10
-
Re: Current state of ActionPlugin
From: jp charras, 2017-01-10
-
Re: Current state of ActionPlugin
From: Chris Pavlina, 2017-01-10
-
Re: Current state of ActionPlugin
From: Jean-Samuel Reynaud, 2017-01-10
-
Re: Current state of ActionPlugin
From: Chris Pavlina, 2017-01-10
-
Re: Current state of ActionPlugin
From: Wayne Stambaugh, 2017-01-10
-
Re: Current state of ActionPlugin
From: Jean-Samuel Reynaud, 2017-01-11
-
Re: Current state of ActionPlugin
From: jp charras, 2017-01-11
-
Re: Current state of ActionPlugin
From: Wayne Stambaugh, 2017-01-11
-
Re: Current state of ActionPlugin
From: Jean-Samuel Reynaud, 2017-01-11
-
Re: Current state of ActionPlugin
From: jp charras, 2017-01-11
-
Re: Current state of ActionPlugin
From: Jean-Samuel Reynaud, 2017-01-16
-
Re: Current state of ActionPlugin
From: Simon Wells, 2017-01-16