Order of base class "OnWhatever()" calls

  • Thread starter Thread starter Jim Matheson
  • Start date Start date
J

Jim Matheson

Hi there,

When overriding form/control functions like "OnLoad()", "OnFormClosed()",
etc., should the base class version be called before or after your own code.
The docs say nothing about this nor give any guidance. It probably depends
on the function itself so are you supposed to determine this. Thanks.
 
Jim,
When overriding form/control functions like "OnLoad()", "OnFormClosed()",
etc., should the base class version be called before or after your own code.

Unless the documentation explicitly says something about this, it's up
to you to decide if you want your own code to run before or after the
base class'. Sometimes, for example with painting, it makes a
significant difference (who paints over who), but you can't say that
one way is more correct than the other.


Mattias
 
Unless the documentation explicitly says something about this, it's up
to you to decide if you want your own code to run before or after the
base class'. Sometimes, for example with painting, it makes a
significant difference (who paints over who), but you can't say that
one way is more correct than the other.

Ok, thanks for the feedback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top