This keyword & Reference to null user defined variable

forum.gupta.bugreport (2005-2010)
Jarmo Muukka

This keyword & Reference to null user defined variable

Post by Jarmo Muukka » 18 Dec 2006, 08:32

 Posted by:  Jarmo Muukka 


I have used functional classes for some time and now I added this keyword to
access instance's objects to clarify code (programmer can see where the
variable or function is located.

For example:
Call DoSomething()
Call this.DoSomething()

The latter is more clear to me, because now programmer can see that the
function is local and not global. And, it works.

What about this?
Call member.DoSomething()
Call this.member.DoSomething()

The previous works and the latter crashes: "Reference to null user defined
variable". WHY? Looks like I have to remove this keword when I call
functions of member variables.

I noticed that this keyword can be used accessing variables.

Set count = 0
Set this.count = 0

The latter works (does not crash).

By the way, we use CTD 2.1 in this project.


Return to “gupta.bugreport”

Who is online

Users browsing this forum: No registered users and 1 guest