View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Checking to see if a class is defined

From: Adam Turoff <adam.turoff_at_gmail.com>
Date: Fri, 25 Jun 2004 09:50:44 -0400

I'm creating a test suite for an XOTcl class I'm writing, and I want to
test this sequence:

(1) MyClass is undefined (initial state)
--- package require MyClass succeeds
(2) MyClass is defined (expected state after loading the package)
(3) MyClass isa ::xotcl::Class
(4) MyClass has methods x, y, z

However, I am not having any luck in testing #1 and #2. Is there any
kind of introspection that can help me determine if a class is defined?
Using [info exists MyClass] doesn't seem to work.

Thanks,

-- Adam