-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The first parameter to these functions should be the reference the object.
so try:
(defn -init [this]
(.setDescription this "this is a derived class")
On 12/27/2008 08:05 PM, CuppoJava wrote:
> Here's my stab at it.
> I'm having problems with the setDescription() line.
> Thanks for your help
> -Patrick
>
> (ns test)
> (gen-class
> :name test.MyDerivedClass
> :extends [SuperClass]
> :init init
> :constructors {[] [String]})
>
> (defn -init []
> ;The following line doesn't work.
> ;I need to call setDescription on this object
> ;who's reference is not available yet.
> (. this setDescription "this is a derived class")
>
> ;Superclass constructor
> [["derived class"] nil]
> >
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAklW0qAACgkQWorbjR01Cx5qaACgyUEFNoNDlPt6YNNhbCCwI92r
FmEAniT/gtGvnmOjDFZVBKIco8tZ4aDQ
=FtTB
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---