|
Using GetPluginName() with OnPluginEnable
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Seriley
(42 posts) bio
|
| Date |
Fri 12 Nov 2010 01:03 AM (UTC) [ quote
] |
| Message |
Lua
function OnPluginEnable()
Note(GetPluginName() .. " has just been enabled")
end
I found this example (in VBScript, I believe) in the Help file discussion for EnablePlugin. I set one up for OnPluginDisable() too.
What I see is ' has just been enabled'. GetPluginName() is returning "" I believe.
The Help file on GetPluginName says it will return the name of the plugin that is executing.
I know my plugin is executing as I see the note ' has just been enabled' output.
Why does GetPluginName not return the name of my plugin here?
I'm using 4.69 now but noticed it when running 4.67. | top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #1 on Fri 12 Nov 2010 02:35 AM (UTC) [ quote
] |
| Message |
You found a bug!
This was introduced during all the "refactoring" improvements in version 4.62.
Fixed in version 4.70, so that during the OnPluginEnable callback, the plugin knows who it is. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Seriley
(42 posts) bio
|
| Date |
Reply #2 on Fri 12 Nov 2010 02:44 AM (UTC) [ quote
] |
| Message |
| Thanks for your prompt response, Nick | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
922 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )