Begginer Question about TK::filevent

D

dhillon2004

Hello All,
I am beginer in Perl. I am trying a serial port data logging
application.
Requirement of my application is that it should be capable of
receiving and transmitting on same or diffrent ports depending on the
options.
I transmit 34 Bytes of data and would receive 34 bytes of data in
return. Now the problem is that I have to time stamp the packet on the
receive side whenever comlete pkt is received.
I am on windows XP machine and I have Active State Perl 5.8
I am using win32::serialPort pm for configuration setup.
I am trying to use Tk::filevent to iniatiate a call back whenever my
Serial port becomes readable.
But i am getting an error "Not a Glob reference in IO pm"
I have given the follwoing command:

$mw->fileevent($ob, 'readable', \&read_comport);
$mw is an my mainwindow instance
$ob is the object of my comport.
I wish to call &read_comport whenever my comport becomes readable
But i get the above error as mentioned above and my program quits.

I am doing right.
Can the object $ob be passed as fileHandle to fileevent??
or I am interprating something wrong!!
Your help would behighly apprecaited!!
Thanks a lot in advance!!

Sincerely,
Mandeep
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top