Re: Help modifying picture sharing example
Re: Help modifying picture sharing example
- Subject: Re: Help modifying picture sharing example
- From: Matt Shepherd <email@hidden>
- Date: Fri, 30 Sep 2005 10:46:43 -0700
To help things out, here is the piece of code that looks like it needs
to be changed:
// This object is also listening for notifications from its
NSFileHandle.
// When an incoming connection is seen by the listeningSocket object,
we get the NSFileHandle representing the near end of the connection. We
write the thumbnail image to this NSFileHandle instance.
- (void)connectionReceived:(NSNotification *)aNotification {
NSFileHandle * incomingConnection = [[aNotification userInfo]
objectForKey:NSFileHandleNotificationFileHandleItem];
NSData * representationToSend = [[imageView image]
TIFFRepresentation];
[[aNotification object] acceptConnectionInBackgroundAndNotify];
[incomingConnection writeData:representationToSend];
[incomingConnection closeFile];
numberOfDownloads++;
[longerStatusText setStringValue:[NSString stringWithFormat:@"Click
Stop to turn off Picture Sharing. Number of downloads this session:
%d.", numberOfDownloads]];
}
On Sep 29, 2005, at 11:37 AM, Matt Shepherd wrote:
I am trying to modify the picture sharing example located in
foundation folder of apple's developer examples. I would like it to
pass a text string back instead of a picture. I am trying to do this
so I can use it as scripting monitor for our scripting servers. I
know very little about cocoa and objective C so any helps or examples
would be much appreciated. What I was hoping for in the end would
just be a text box instead of an image box that you could type a
string in for the status of the server. The browser app would just
display a list of servers and if you clicked on it it would show the
string that that server was publishing. Maybe it would refresh every
so often while that server was selected.
Thanks in advance.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
=======================================================================
=
This e-mail message has been scanned for Viruses and Content and
cleared by School Specialty's email filtering solution.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden