Re: About sockets...(part III)
Re: About sockets...(part III)
- Subject: Re: About sockets...(part III)
- From: email@hidden
- Date: Fri, 31 May 2002 20:24:42 -0700
It seems like, (no offense) you need to buy a book and start with some
simpler examples of Cocoa applications before trying to develop the app
you have in mind.
I'd suggest Cocoa Programming for Mac OS X by Aaron Hillegass
http://www.amazon.com/exec/obidos/ASIN/0201726831
On Friday, May 31, 2002, at 01:08 PM, malcom wrote:
Some questions...(sorry for the stupid questions...)
What's this?
This is a category on the Socket class, to expose the private variable
declared in SmallSocket's Socket class.
@interface Socket (ExposeFD)
- (int)socketfd;
@end
@implementation Socket (ExposeFD)
- (int)socketfd { return socketfd; }
@end
And this? (socketfd)
socketfd is the integer instance variable in Socket, which holds the
file descriptor for the BSD socket.
@implementation IRCController
- (void)appendOutput:(NSString *)s color:(NSColor *)color
{
int len = [[output textStorage] length];
[output replaceCharactersInRange:NSMakeRange(len, 0) withString:s];
[output setTextColor:color range:NSMakeRange(len, [s length])];
[output scrollRangeToVisible:NSMakeRange([[output textStorage]
length], 0)];
}
This is the event?
NO. This is a method which appends a string of a certain color and
scrolls to the bottom of an NSTextView
Thanx and sorry again :)
Please buy a book and don't ask the list to educate you without any work
on your part. You're not going to get far if you don't learn
Objective-C and Foundation basics before you try to build complex
programs.
-malcom-
FYI: the method that gets called when new data arrives on the socket is
called dataFromServer:
that method gets called because I added a the example controller as an
observer of NSFileHandleReadCompletionNotification events in awakeFromNib
_______________________________________________
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.