NAME
is - test argument to see if it is a class or an object
SYNOPSIS
iiss option ?arg arg ...?
DESCRIPTION
The iiss command is used to check if the argument given is a class or an
object; depending on the option given. If the argument if a class orobject, then 1 is returned. Otherwise, 0 is returned. The iiss command
also recognizes the commands wrapped in the itcl ccooddee ccoommmmaanndd..The option argument determines what action is carried out by the com-
mand. The legal options (which may be abbreviated) are:iiss ccllaassss command
Returns 1 if command is a class, and returns 0 otherwise.
The fully qualified name of the class needs to be given as the command argument. So, if a class resides in a namespace, then the namespace needs to be specified as well. So, if a class CC rreessiiddeess iinn aa nnaammeessppaaccee NN,, tthheenn tthhee ccoommmmaanndd sshhoouulldd bbee ccaalllleeddlliikkee:: iiss NN::::CC
or iiss ::::NN::::CC
iiss object ?-ccllaassss className? command
Returns 1 if command is an object, and returns 0 otherwise.
If the optional "-ccllaassss" parameter is specified, then the com-
mand will be checked within the context of the class given. Notethat className has to exist. If not, then an error will be
given. So, if className is uncertain to be a class, then the
programmer will need to check it's existance beforehand, or wrap
it in a catch statement.So, if cc is an object in the class CC, in namespace N then these
are the possibilities (all return 1): set obj [N::C c] is object
N::c is object c is object $obj is object [code c]
KKEEYYWWOORRDDSS class, objectitcl 3.3 is(n)