newbie widgets/NSTimer question
newbie widgets/NSTimer question
- Subject: newbie widgets/NSTimer question
- From: "Jonathan Turner" <email@hidden>
- Date: Thu, 7 Feb 2002 07:20:12 -0500
I'm trying to make a telnet window out of a NSTextView and a NSTextField. I
want the input the user sends to be typed into the NSTextField and the output
of the telnet connection to be pumped into the NSTextView. I have the
NSTextField sending messages to the NSTextView just fine, so it should be a
problem to send those messages to a TelnetController type object.
Okay, first question, is that even the right way to do it?
Second question, if I'm going in the right direction, how do I get my
TelnetController object to send messages to NSTextView whenever there is new
data on the socket? I was thinking at first the best thing would be to set a
NSTimer and when it fired it sent a message to NSTextView to poll the socket.
Or I could use multiple threads and have it sitting on a 'select' for the
socket.
Any suggestions? Also, I tried getting NSTimer to just send messages, but I
can't seem to understand how its syntax works. Anyone have just some sample
code on how to get an NSTimer to send messages to an object every second or
every 0.1 secs?
Thanks
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.