[Gambas-user] Overriding native classess
Benoît Minisini
gambas at ...1...
Mon Dec 16 00:49:03 CET 2013
Le 16/12/2013 00:36, Bruce a écrit :
> I've got myself in a real mess with this one. :-(
>
> I have a class in a local ("third-party") component that inherits the
> native Application class. It provides some generic setup stuff, database
> connectivity across networks and some basic security. It works fine and
> has done so for a few years.
>
> Now I have a need to override the Application class itself in a project
> that uses this component (to provide an additional property which is a
> collection of gb.logging Logger objects.) The new Application class uses
> an _init() method to set up these logs.
>
> When I run the project through the IDE, it starts and the stack
> backtrace panel shows "(native code)" and execution just stops. It
> doesn't hang or anything, it just stops as if it hit a debugging
> breakpoint. There is no further information. If I then continue
> execution (via F5 ) the program just ends. No errors, nothing.
>
> I realise that the problem is caused by this mixing of overriding and
> inheriting the native Application class. My problem is that I can't see
> where to start looking for a solution.
>
> So,
> Is this mixing of inheritance and overrides on native classes "illegal"?
> (If not) Does anyone know what is going on inside this "native code" at
> the point of program startup?
>
> tia
> Bruce
>
>
Without the source code, hard to say.
Usually the depicted behaviour is an error returned by the debugger not
displayed by the IDE, because it is raised "too early" (when
initializing classes).
--
Benoît Minisini
More information about the User
mailing list