On Sun, 01 Dec 2013, Nigel Verity wrote: > > > > Hi Tobi > > Perhaps if I describe a scenario I encountered yesterday you can advise on > whether the behaviour should be expected or whether there is actually a bug. > > I always structure my projects using the default approach so that each form > has its associated .class file in which the form-specific code resides. > However, user-defined functions which may be used on multiple forms I place > in a .module file, usually called mdlShared. > > My problem yesterday involved calls to mdlShared.setFontAttributes(). After a > bit of redesigning I replaced this function with mdlShared.setFont(). > Unfortunately I forgot to remove several calls to .setFontAttributes() even > though I had removed the function itself. These calls were not detected by > "Compile All" but resulted in runtime errors. >
Yes, this is the correct behaviour as a module is only a static class. If you use a module, you use a "singleton" of that class. Being a singleton or not, you use an *object* and to support inheritance and method overriding - which Gambas does for modules - the interpreter needs to resolve method calls, as in your case, not before runtime. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
