[ns] $self - What does this mean????????

Shyam Subramanian sshyam10@yahoo.com
Fri Apr 12 05:16:05 2002


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C1E1C2.9A4988E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I was going thro chapter 3 in the manual and i was also going thro the =
code, that was give there. In the TCL scripts that have been written i =
come accross a lot of $self variable what does this mean, is it the same =
as the this pointer in C++ or some thing different, i wasnt able to =
figure it out correctly.

Specifically in the code below=20

Class SplitObject
SplitObject set id 0

SplitObject instproc init args {
 $self next
 if [catch "$self create-shadow $args"] {
  error "__FAILED_SHADOW_OBJECT_" ""
 }
}
 what does $self next does and what does the $self create-shadow $args =
does.

Can someone please help me.

Thanks in advance

Shyam Subramanian

------=_NextPart_000_0005_01C1E1C2.9A4988E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I was going thro chapter 3 in the =
manual and i was=20
also going thro the code, that was give there. In the TCL scripts that =
have been=20
written i come accross a lot of $self variable what does this mean, is =
it the=20
same as the this pointer in C++ or some thing different, i wasnt able to =
figure=20
it out correctly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Specifically in the code below =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Class SplitObject<BR>SplitObject set id =

0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>SplitObject instproc init args =
{<BR>&nbsp;$self=20
next<BR>&nbsp;if [catch "$self create-shadow $args"] =
{<BR>&nbsp;&nbsp;error=20
"__FAILED_SHADOW_OBJECT_" ""<BR>&nbsp;}<BR>}<BR>&nbsp;what does $self =
next does=20
and what does the $self create-shadow $args does.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can someone please help =
me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Shyam =
Subramanian</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C1E1C2.9A4988E0--


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com