• 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
Sending a custom object over NSConnection using socket ports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending a custom object over NSConnection using socket ports


  • Subject: Sending a custom object over NSConnection using socket ports
  • From: "Bryan Bonczek" <email@hidden>
  • Date: Thu, 20 Jul 2006 13:24:12 -0400
  • Thread-topic: Sending a custom object over NSConnection using socket ports

Hello all,

I have been experiencing some difficulties using NSConnection (using socket ports) to send a message to a vended object that takes a custom object as a parameter.

For example, if I have the following method in my vended object:

-(void)receiveMessage:(MyCustomObject*)myObject

and then I try to send a message to it, I get an NSInternalConsistencyError saying that the object cannot be unpacked.

However, if I change the method to:

-(void)receiveMessage:(NSString*)stringObject

and send an NSString, the NSString gets unpacked just fine.


Has anyone else encountered this problem?  Why does this work for Foundation objects and not my custom object?  Is there a protocol that MyCustomObject needs to implement in order for this to work?



Thanks,

Bryan Bonczek
 _______________________________________________
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

  • Follow-Ups:
    • Re: Sending a custom object over NSConnection using socket ports
      • From: Adam Maxwell <email@hidden>
  • Prev by Date: Re: Attributed strings and custom attributes
  • Next by Date: Re: read com.apple.mail.plist
  • Previous by thread: Re: How do you use NSTextView methods on a NSView ? (keywords: TextEdit, sort lines)
  • Next by thread: Re: Sending a custom object over NSConnection using socket ports
  • Index(es):
    • Date
    • Thread