Re: When and where do I do Set m_FormVar = Nothing?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Fri, 5 Jun 2009 17:18:31 -0500
"MM" <kylix_is@xxxxxxxxxxx> wrote in message
news:06ri251844s82d5amqmhjl26kqskvgtt4b@xxxxxxxxxx
Question: What kind of code absolutely HAS to appear in
Form_Initialize and nowhere else?
Similarly, what kind of code absolutely HAS to appear in
Form_Terminate and nowhere else?
For a Form No code absolutely HAS to appear in _Initialize or _Terminate and
nowhere else. Except perhaps some debug routine to report a class has
initialized. or terminated.
Of course one should never say never, it might be possible to come up with
something that works better there with some kind of forced flow control, but
it is just as likely you could turn around and port that code into
_Load/_Unload and get the same results.
You will even find some 'experts' suggest that you never use them. Their
reason - if they fail, they do so with little reporting back to the program.
Not that you can't - just you are limited.
For Classes (and for Forms), put anything there to set up the Class data
(members) that has to be there before the Client touches the class, that has
a limited ability to fail. But even there - you are limited. You cannot
receive outside arguments and you can't fail graciously. Best to provide
your own _Init/_Open or _Destroy/_Close methods. They can take arguments,
return arguments, and report errors back.
-ralph
.
- References:
- When and where do I do Set m_FormVar = Nothing?
- From: MM
- Re: When and where do I do Set m_FormVar = Nothing?
- From: Ralph
- Re: When and where do I do Set m_FormVar = Nothing?
- From: MM
- Re: When and where do I do Set m_FormVar = Nothing?
- From: Karl E. Peterson
- Re: When and where do I do Set m_FormVar = Nothing?
- From: MM
- Re: When and where do I do Set m_FormVar = Nothing?
- From: Larry Serflaten
- Re: When and where do I do Set m_FormVar = Nothing?
- From: Ralph
- Re: When and where do I do Set m_FormVar = Nothing?
- From: Larry Serflaten
- Re: When and where do I do Set m_FormVar = Nothing?
- From: MM
- When and where do I do Set m_FormVar = Nothing?
- Prev by Date: Re: When and where do I do Set m_FormVar = Nothing?
- Next by Date: Re: When and where do I do Set m_FormVar = Nothing?
- Previous by thread: Re: When and where do I do Set m_FormVar = Nothing?
- Next by thread: Re: When and where do I do Set m_FormVar = Nothing?
- Index(es):
Relevant Pages
|