From fdd1b201f773d7e1215114e8eb9bcb593c2b59a7 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Thu, 15 Nov 2012 15:06:07 +0100 Subject: [PATCH] generator: Fix misleading warning for callbacks in virtual methods Wen generating a virtual method, the current member was not set in the GenerationInfo. That caused the warning message about the callback scope to refer to a wrong method name. --- generator/GObjectVM.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/GObjectVM.cs b/generator/GObjectVM.cs index 8aac614d8..00ae03428 100644 --- a/generator/GObjectVM.cs +++ b/generator/GObjectVM.cs @@ -54,6 +54,8 @@ namespace GtkSharp.Generation { public void Generate (GenerationInfo gen_info, ObjectBase implementor) { + gen_info.CurrentMember = Name; + if (!CanGenerate (gen_info, implementor)) throw new NotSupportedException (String.Format ("Cannot generate virtual method {0}.{1}. Make sure a writable glue path was provided to the generator.", container_type.Name, this.CallString));