On Mon, Dec 2, 2013, at 21:00, Martins Piksis wrote:
> Hello, can anyone explain to me why I get error msg.: Error:
> #<NameError: undefined local variable or method `field_build' for
> Visual::Plugin_A:Module> on this code:
> 
> require("visual_visual_mod.rb")
> require("sketchup.rb")
> 
> module Visual::Plugin_A
> 
> # module methods, module vars, etc.
> 
>   unless file_loaded?(File.basename(__FILE__))
> 
>   Visual::SUBMENU_VisDose.add_item ("VisDose 3D") {
> 
> 
> field_build
> 
> }
> 
> def field_build

You are calling the field_build method directly from within the
module definition, before the method is defined.

-- 
Lars Haugseth