Subject: | invalid method processMessags( ) |
Date: | Thu, 18 Aug 2011 10:23:40 -0500 |
To: | bug-Finance-InteractiveBrokers-SWIG [...] rt.cpan.org |
From: | Chris Fluur <chrisfluur [...] gmail.com> |
Also, quick question - I am getting a popup in TWS, so this code must be
connecting properly. But is there anyway to disable that popup?
Onto the bug report...
------------------------------------------------------------------------------------------------------------
./test perl script:
------------------------------------------------------------------------------------------------------------
#!/usr/bin/perl
use Finance::InteractiveBrokers::SWIG;
use myeventhandlers;
my $handler = MyEventHandler->new();
my $ib = Finance::InteractiveBrokers::SWIG->new(handler => $handler);
$ib->eConnect( 'localhost',7496,1);
$ib->reqCurrentTime();
# Your event loop here
$ib->processMessags()
while( $ib->isConnected() );
# And eventually...
$ib->eDisconnect();
------------------------------------------------------------------------------------------------------------
myeventhandler.pm:
------------------------------------------------------------------------------------------------------------
#!/usr/bin/perl
package MyEventHandler;
use base qw( Finance::InteractiveBrokers::SWIG::EventHandler );
use strict;
use warnings;
my $handler = MyEventHandler->new();
sub currentTime {
print "current time!\n";
print "@_\n";
# Do something with received time
}
------------------------------------------------------------------------------------------------------------
output:
------------------------------------------------------------------------------------------------------------
C++ constructor
C++ eConnect()
C++ reqCurrentTime()
C++ isConnected()
Finance::InteractiveBrokers::SWIG: invalid method processMessags( ) called
at
/Library/Perl/5.10.0/darwin-thread-multi-2level/Finance/InteractiveBrokers/SWIG.pm
line 233
Finance::InteractiveBrokers::SWIG::AUTOLOAD('Finance::InteractiveBrokers::SWIG=HASH(0x1008d9fc0)')
called at ./test line 18
C++ destructor