Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help modifying picture sharing example



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:
http://lists.apple.com/mailman/options/cocoa-dev/ 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Help modifying picture sharing example (From: Matt Shepherd <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.