Re: STklos anomaly? Help!
Note: This message is rather long. If you have not been following
this discussion, you might want to hit the delete key now.
>>>> Brian Denheyer <briand_at_deldotd.com> wites:
>><various snippage>
> 1.
> (describe foo)
STk> (describe foo)
foo is a class. It's an instance of <class>
Superclasses are:
<object>
Directs slots are:
a
b
c
d
e
f
g
(No direct subclass)
Class Precedence List is:
foo
<object>
<top>
Class direct methods are:
Method #[<accessor-method> 495f14]
Generic: the setter of e
Specializers: foo <top>
Method #[<accessor-method> 497a8c]
Generic: e
Specializers: foo
Method #[<accessor-method> 455dd4]
Generic: the setter of d
Specializers: foo <top>
Method #[<accessor-method> 459eb4]
Generic: d
Specializers: foo
Method #[<accessor-method> 45c758]
Generic: the setter of c
Specializers: foo <top>
Method #[<accessor-method> 45e2e8]
Generic: c
Specializers: foo
Method #[<accessor-method> 4629d4]
Generic: the setter of b
Specializers: foo <top>
Method #[<accessor-method> 464180]
Generic: b
Specializers: foo
Method #[<accessor-method> 46805c]
Generic: the setter of a
Specializers: foo <top>
Method #[<accessor-method> 4690e8]
Generic: a
Specializers: foo
> Also, try using
>
> (require "class-browser")
> (class-browser)
STk> (require "class-browser")
*** Error at line 141 of file /usr/local/lib/stk/3.99.4/STk/Tk-meta.stklos:
for-each: malformed list
> 2.
>
> Don't specify the accessors and then create the accessor explicitly,
> i.e.,
That works.
> 3.
> Try reversing the order of the names.
Same result, except backwards. That is, the a and b accessors are missing.
> 4.
> Try using both snow and stk.
This is getting stranger and stranger. Snow works - with seven slots.
Out of curiosity I started adding more slots. When I added one more
slot and loaded the file I got:
STk> (load "foo")
*** Error at line 10 of file ./foo:
for-each: malformed list
Current eval stack:
__________________
0 (for-each (lambda (s) (let ((name (slot-definition-name s)) (getter (slot-definition-getter s)) (setter (slot-definition-setter s)) (accessor (slot-definition-accessor s))) (if getter (ensure-method getter (list (quote o)) (list class) (quasiquote ((slot-ref o (quote (unquote name))))) env <accessor-method>)) (if setter (ensure-method setter (list (quote o) (quote v)) (list class <top>) (quasiquote ((slot-set! o (quote (unquote name)) v))) env <accessor-method>)) (if accessor (begin (ensure-method accessor (list (quote o)) (list class) (quasiquote ((slot-ref o (quote (unquote name))))) env <accessor-method>) (ensure-method (quasiquote (setter (unquote accessor))) (list (quote o) (quote v)) (list class <top>) (quasiquote ((slot-set! o (quote (unquote name)) v))) env <accessor-method>))))) slots)
1 (let ((instance (allocate-instance class initargs))) (initialize instance initargs) instance)
2 (apply make metaclass :dsupers supers :slots slots :name name :environment env options)
3 (let ((old (%find-class name env #f)) (cls (apply make metaclass :dsupers supers :slots slots :name name :environment env options))) (when old (class-redefinition old cls)) (set-symbol! name cls env) cls)
4 (begin (ensure-class (quote foo) (quote ()) (quote ((a :accessor a :init-keyword :a :initform #f) (b :accessor b :init-keyword :b :initform #f) (c :accessor c :init-keyword :c :initform #f) (d :accessor d :init-keyword :d :initform #f) (e :accessor e :init-keyword :e :initform #f) (f :accessor f :init-keyword :f :initform #f) (h :accessor h :init-keyword :h :initform #f) (g :accessor g :init-keyword :g :initform #f))) (ensure-metaclass (quote ()) (the-environment)) (the-environment)) (make-undefined))
5 (load "foo")
> 5.
> Try "building" your example one slot at a time using different names
> for the classes and slots and see if it still breaks after 5 slots.
Yup.
> 6.
> I debated as to whether or not this should be the first thing to
> try. I would delete the current install of stk, i.e. _delete_
> /usr/local/lib/stk, i.e. the installation directory, and the source
> directory. Don't forget to delete the executables in /usr/local/bin.
> Really clean it out so there are no previous build executables or
> libraries lying around. Re-install the source and re-build.
Done that - on two different SCO machines.
> I've probably got some more crazy ideas if the need arises. For one
> thing, we could run your code on my linux box and I'll e-mail you the
> results :-) Anything to avoid PERL. ;-)
Oh, it works great on my linux box. Unfortunately, SCO is
on all the production machines (for this project).
If you have never had to build software under SCO be thankful.
I had to change a couple of items in io.c, posix.c, and process.c
to get it to build but I don't think it is related to the slot problem.
Thanks very much for your help.
-Dave
Received on Tue Apr 13 1999 - 20:40:44 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST