Forum: IronRuby Type conversion error

49937800ddb918787f61f88fe100562f?d=identicon&s=25 andrew Wilson (Guest)
on 2010-11-09 21:54
(Received via mailing list)
Has anyone run into type conversion errors where you get a message like:

can't convert PcapFileHandler::PcapFileWriter into
PcapFileHandler::PcapFileWriter (TypeError)

when doing:

packetHandlerWrapper.PcapWriter =
NetworkMiner::PacketHandlerWriter.clr_new("", someobj)

I am totally buggered up with this.  The packetHandlerWrapepr.PcapWriter
is
nil when I inspect it with ruby.

I have to solve this by tonight :'(

-a

--
If I had six hours to chop down a tree, Id spend the first four of them
sharpening my axe.

-Abraham Lincoln
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2010-11-09 22:37
(Received via mailing list)
Yes, you probably have the assembly that defines the type loaded twice
in different load contexts (Load vs LoadFrom).
That might happen if you load the assembly using a file path (require
'x.dll') instead of a full assembly name and then dependency loads it as
well.

Tomas

From: ironruby-core-bounces@rubyforge.org
[mailto:ironruby-core-bounces@rubyforge.org] On Behalf Of andrew Wilson
Sent: Tuesday, November 09, 2010 12:38 PM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] Type conversion error

Has anyone run into type conversion errors where you get a message like:

can't convert PcapFileHandler::PcapFileWriter into
PcapFileHandler::PcapFileWriter (TypeError)

when doing:

packetHandlerWrapper.PcapWriter =
NetworkMiner::PacketHandlerWriter.clr_new("", someobj)

I am totally buggered up with this.  The packetHandlerWrapepr.PcapWriter
is nil when I inspect it with ruby.

I have to solve this by tonight :'(

-a

--
"If I had six hours to chop down a tree, I'd spend the first four of
them sharpening my axe".

-Abraham Lincoln
637f25ef9ecc971bdeeb05c533f36b60?d=identicon&s=25 Andrius Bentkus (Guest)
on 2010-11-09 23:24
(Received via mailing list)
On Tue, Nov 9, 2010 at 10:18 PM, Tomas Matousek <
Tomas.Matousek@microsoft.com> wrote:

>
>
>

What is it with this big blue font, Tomas? :D
This topic is locked and can not be replied to.