• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help modifying picture sharing example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: Re: XML parser for objective C
  • Next by Date: API for Modifying Dock Contents
  • Previous by thread: Re: Help modifying picture sharing example
  • Next by thread: Mouse Motion...
  • Index(es):
    • Date
    • Thread