[rdnzl-devel] A question about CAST

Iver Odin Kvello iok at selvaag.no
Thu Apr 26 15:43:29 UTC 2007


> Strange.  Does that only happen for certain objects or always if you
try to cast something back and forth?

Only for certain objects, but I can reproduce it fairly easily:

RDNZL-USER(5): (import-types "System" "Net.WebClient")
NIL
RDNZL-USER(6): (setf w (new "System.Net.WebClient"))
#<RDNZL::CONTAINER System.Net.WebClient #xda75ac8>
RDNZL-USER(7): (cast w "System.Object")
Error: .NET error (System.InvalidCastException): Object must implement
IConvertible.
  [condition type: RDNZL-ERROR]

I didn't think of it as an issue; I just assumed it was some sort of
.Net restriction.

Iver Odin Kvello
iok at selvaag.no



More information about the rdnzl-devel mailing list