hello everyone,
I created a test plugin but sketchup tells me that there is always an error, and I can not detect the error yet I took example on another functional plugin, then there is Does anyone who can help me thank you very much
So you have a file named main.rb in the subfolder named after your main module [referenced by PLUGIN_DIR] ?
But haven’t shown any code in it which does anything ??
I can’t see anything name Heron::Heron_Panel::Plugin set up in your code [which isn’t # out] - are we seeing all of it ???
Also, why are you requiring [relatively] plugin.rb ?
It’s not needed in this simple example, in any case…
Try this - miss out the { } around the main module code block - I only just noticed those !
And forget the require for plugin.rb…
Leave your # lines alone.
Retest…
You still have some spare ` in your example code near the end - these are only for the forum’s post formatting - NOT needed in the RB file’s code itself.
The error is occurring in heron_toolbox.rb as explained in the error message.
Is your posted code the full code that it contains ?
How is that RB getting loaded ?
It is not mentioned in any of the examples you have provided !
It should be in the matching module’s subfolder, which tour extension references as ‘main’ in earlier examples !
Does ‘main’ load it ??
Reading the error message it looks like you have that heron_toolbox.RB file placed directly into the main Plugins folder, and NOT the expected module’s subfolder, so currently it automatically loads - incorrectly…
Please re-post its full code…
This is the line causing the error in the registrar script …
The issue is that the constant reference Plugin is not YET defined (when this file is loading,) and is only LATER defined in the third file to load ("plugin.rb".)
@LOUZA Please check the preview of the posts you make - making sure that the formatting looks good. Otherwise it’s very hard to read your posts and code.
I have gone ahead an corrected your previous posts in this thread. Please use the Edit function of the forum if you find a mistake in your formatting after posting.