From 636795a9c5baadf38c2da7c44ae22041afb48597 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sat, 26 Jan 2013 23:22:02 -0500 Subject: [PATCH] ide/CodeEditor: Fixed overriding of virtual methods - The IDE would assume methods need to be chained for virtual methods defined within current module. Now assuming they don't. - Overriding OnRedraw in a Window or Main in a Thread instance would chain to Window::OnRedraw() / Thread::Main() even though that is not required - Note: It is not possible at this point to know whether the method should be chained or not for the current module (not compiled) --- compiler/libec/src/loadSymbols.ec | 2 +- ide/src/designer/CodeEditor.ec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/libec/src/loadSymbols.ec b/compiler/libec/src/loadSymbols.ec index 9bdfe39..ce1081a 100644 --- a/compiler/libec/src/loadSymbols.ec +++ b/compiler/libec/src/loadSymbols.ec @@ -36,7 +36,7 @@ public void SetInPreCompiler(bool b) {inPreCompiler = b; } OldList * precompDefines; public void SetPrecompDefines(OldList * list) { precompDefines = list; } -bool DummyMethod() +public bool DummyMethod() { return true; } diff --git a/ide/src/designer/CodeEditor.ec b/ide/src/designer/CodeEditor.ec index ea1a4a6..c74bc5a 100644 --- a/ide/src/designer/CodeEditor.ec +++ b/ide/src/designer/CodeEditor.ec @@ -6165,7 +6165,10 @@ class CodeEditor : Window f.Printf("\n"); - if(!_class || (isInstance ? _class : _class.base)._vTbl[method.vid] == moduleClass._vTbl[__ecereVMethodID___ecereNameSpace__ecere__com__Module_OnLoad]) // Temp Check for DefaultFunction + if(!_class || + ( + (isInstance ? _class : _class.base)._vTbl[method.vid] == moduleClass._vTbl[__ecereVMethodID___ecereNameSpace__ecere__com__Module_OnLoad] || + (isInstance ? _class : _class.base)._vTbl[method.vid] == DummyMethod)) // Temp Check for DefaultFunction { if(returnType && returnType.kind == classType && !strcmp(returnType._class.string, "bool")) { -- 1.8.3.1