Matt Slay wrote:
> When I'm writing a form class or a form.scx  with custom methods, what is
> the best practice for referring to the form itself in its method code?
>
> Should you use:
>
>  This.PropertyName and This.MethodName()
>
>  or
>
> ThisForm.PropertyName and ThisForm.MethodName()
>
> So it's a question of "this" vs. "thisform"
>
> In the case of a form they both get you to same place.
>
> So, what are most of you doing?


I'd recommend using "THIS" instead of thisform because of the way I
generally feel about classes and class design.  I like things of a
relative nature.  There's probably some other (perhaps better) technical
reasons but that's off the top of my head.  Ok here's another---I like
it because if I move the code to somewhere else, perhaps at a container
level, by using THIS, it still works.  If I had used THISFORM, I'd have
to change my references since it's owner was no longer a form.

Cheers!!
--Michael





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to