• 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: Passing an NSImage between processes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing an NSImage between processes


  • Subject: Re: Passing an NSImage between processes
  • From: Brian Hill <email@hidden>
  • Date: Tue, 16 Oct 2001 12:28:32 -0500

On Tuesday, October 16, 2001, at 11:59 AM, Dave MacLachlan wrote:

I have two apps that I'm trying to pass an NSImage* between using an
NSConnection and an NSProxy.

my protocol has:

-(bycopy)GetImage;

and it appears that my client gets an NSImage just fine from the server.
However when I go to draw it I get nothing. Any ideas? I get a note in the
console saying that my context is invalid (from the server app) when the
client attempts to draw.

How should I go about this?


I'd bet that the NSImage is somehow latching into the drawing contexts from the server app, which may not be valid. IIRC, NSImage is fairly well tied into the app kit, and probably the application instance/drawing contexts that create it. Since it's the server app that's logging the error message, it sounds like even though you've specified 'bycopy', it's actually passing a reference and trying to draw in the context of the server app.

I'd look at trying to pass an NSData representation of the image instead of an NSImage between processes.

Brian

email@hidden http://personalpages.tds.net/~brian_hill
___________________________________________________________
"Why? I came into this game for adventure - go anywhere, travel
light, get in, get out, wherever there's trouble, a man alone.
Now they've got the whole country sectioned off and you can't
move without a form. I'm the last of a breed."
-- Archibald "Harry" Tuttle, Rogue HVAC Repairman
___________________________________________________________


References: 
 >Passing an NSImage between processes (From: "Dave MacLachlan" <email@hidden>)

  • Prev by Date: sending data from one app to another
  • Next by Date: Re: Instantiating window from nib
  • Previous by thread: Passing an NSImage between processes
  • Next by thread: sending data from one app to another
  • Index(es):
    • Date
    • Thread