• 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
Distributed Objects, copying thereof
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distributed Objects, copying thereof


  • Subject: Distributed Objects, copying thereof
  • From: "Jim Thomason" <email@hidden>
  • Date: Thu, 8 Jun 2006 11:23:13 -0500

I'm working on an application using distributed objects, and it's
working, but it's a little clunky and I wanted to see if I'm doing it
the right way.

In short, I need to pass some NSImages and NSBezierPaths around from
clients to the server. And this "works", in asmuch as the objects show
up on the server end, look right (-description looks reasonable), etc.

But, it's not functional because I can't display them. If I add them
to my view, they don't display properly.

I've fixed the issue by instead of handing around the objects
themselves, I hand around archived data versions of them and re-create
new objects on the far end of the connection. This now behaves
properly, but it just strikes me as...clunky.

As a side, oddball note, I found that I can recreate my bezierpath by
simply appending the bezierpath that I received from the client, but
only if the path doesn't contain curves. If I send a path created with
+bezierPathWithOvalInRect, it displays improperly and quickly crashes.
Regular straight line paths work with this approach. Archiving the
path to data works no matter what.

So, basically, am I doing this properly, or is there some slick
alternate method to use instead? Also, are there any good guidelines
around as to exactly when I'd need to do something like this to copy
over an object? I'd tried using the bycopy flags, but it didn't have
any effect, though I may have been using them improperly, I just added
on a bycopy into my method -(void) addBezierPath:(bycopy
NSBezierPath*) newPath.

Whenever I end up doing extra work like this outside of apparent APIs,
I tend to think that I'm making more work for myself than I need, so I
go to the group. The various docs I've found haven't really shed any
light on the issue.

Thanks for any insight.

-Jim....
_______________________________________________
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: Distributed Objects, copying thereof
      • From: John Pannell <email@hidden>
  • Prev by Date: Update NSTextField programatically while cursor is in it
  • Next by Date: NSWindow losing track of its buttons/controls
  • Previous by thread: Re: Update NSTextField programatically while cursor is in it
  • Next by thread: Re: Distributed Objects, copying thereof
  • Index(es):
    • Date
    • Thread