Methods not declared Overidable (like OnFetch)

Posts   
 
    
ADF1969
User
Posts: 37
Joined: 28-Mar-2006
# Posted on: 30-Apr-2006 05:10:27   

I was trying to insert some code at an entry point in the EntityBase object and thought the OnFetch() override was the perfect location...then I discovered it was not declared "overridable."

Is there a reason some methods are declared overridable and others are not?

I would think "OnFetch()" would be overridable. How else is it used?

Of course this is not an issue for the first child of EntityBase, but in the 2-class self-servicing arch. it really limits what you have available in the Entity class for overrides.

If I'm missing something here, I'm ready to be educated confused

Andrew.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 30-Apr-2006 09:07:37   

OnFetch is protected virtual, so you can override it in any derived class (no matter how deep the hierarchy is).

Frans Bouma | Lead developer LLBLGen Pro
ADF1969
User
Posts: 37
Joined: 28-Mar-2006
# Posted on: 01-May-2006 22:57:24   

You are correct.

For some reason the IDE was complaining, but now it is not.

Chock it up to VS2005 "issues"...everything is fine and functioning as I would expect now.

Thanks for the feeback.

Andrew.