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

[Xotcl] info subclass

From: Kristoffer Lawson <setok_at_scred.com>
Date: Sat, 24 Apr 2010 18:42:30 +0300

In my 1.2 version of XOTcl (OSX) [info subclass] works in the
following way:

Class Foo

Class Bar -superclass Foo

Foo info class Bar
=> 1

However the current documentation says the parameter given is a
pattern and the fully qualified name is returned, or empty if no match
was found. Has this changed at some point? This would be quite an
incompatible change.

I actually prefer how it works on my installation. I want to
explicitly check if one class is a subclass of another, as objects,
not as patterns (patterns can be risky). And it's not actually clear
what is meant by 'pattern'. Foo is a class, Bar is a class, but Foo's
actual fully qualified name is ::Foo, so if I wanted an exact search
it should be against ::Foo, but will it also match 'Foo' (as desired)?

-- 
Kristoffer Lawson, Co-Founder, Scred // http://www.scred.com/