Re: Twisted and Tkinter

2006-04-28 Thread [EMAIL PROTECTED]
Fredrik is right, ChatFactory doesn't have sendLine as a method b/c it doesn't inherit it from ClientFactory. The code: protocol = ChatClient does do anything within ChatFactory except set the variable. Try out these. from twisted.protocols.basic import LineReceiver, LineReceiver.sendLine or chan

Re: Twisted and Tkinter

2006-04-27 Thread Chris
There is no manual that's the problem. The sendLine method is part of LineReceiver which is part of twisted. It's used to send a message over the transport link. I can get it working by overriding twisted's methods for example linereceived() or connectionmade(). But how do I get it to send a messag

Re: Twisted and Tkinter

2006-04-27 Thread Fredrik Lundh
"Chris" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > it now comes up with the error message > > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "C:\Documents and Settings\chris\Desktop

twisted and tkinter chat client

2006-04-27 Thread Chris
Hi, Sorry for reposting but I changed my code and received a new error message so I thought I would try it on the group again. I have a working server and this is meant to be a chat client using tkinter that connects to the server and sends messages. However I receive this error message when I cli

Re: Twisted and Tkinter

2006-04-27 Thread Chris
it now comes up with the error message Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Documents and Settings\chris\Desktop\Python\client.py", line 30, in sendMessage self.sendLine("Test") AttributeErr

Re: Twisted and Tkinter

2006-04-27 Thread Fredrik Lundh
Chris wrote: > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > TypeError: unbound method sendMessage() must be called with ChatFactory > instance as first argument (got nothing i

Re: Twisted and Tkinter

2006-04-27 Thread Chris
Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) TypeError: unbound method sendMessage() must be called with ChatFactory instance as first argument (got nothing instead) I have simplifie

Re: Twisted and Tkinter

2006-04-27 Thread Fredrik Lundh
"Chris" wrot: > Sorry. The error message is normally AttributeError: 'NoneType' object > has no attribute 'sendLine'" please post the *entire* traceback, including the part that lists filenames, line numbers, and source code lines. -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted and Tkinter

2006-04-27 Thread Chris
Sorry. The error message is normally AttributeError: 'NoneType' object has no attribute 'sendLine'" [EMAIL PROTECTED] wrote: > Posting that error message would be helpful -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted and Tkinter

2006-04-27 Thread [EMAIL PROTECTED]
Posting that error message would be helpful -- http://mail.python.org/mailman/listinfo/python-list

Twisted and Tkinter

2006-04-26 Thread Chris
Does anyone know how to use twisted and tkinter. I have a simple tcp server and I want to send messages to it once connected using a tkinter button? I have built the code as far as I can but don't know what to do from here. Any reference I try to put to sendmessage in chatfactory doesn'