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: Distributed Objects



Dan,  both emails you've sent have been very helpful.  From your first email, I was then able to isolate some articles that pointed out that Cocoa archives can hold Objective-C and Java objects, scalars, arrays, structures, and strings.  Therefore, I simply changed the <protocol> of the methods to return a NSString and it I'm able to return very large NSString values from the server to the client.  

@interface Traceroute : NSObject
- (NSString *)do_trace:(NSString *)words;
@end

@implementation Traceroute
- (NSString *)do_trace:(NSString *)words {
    NSLog(@"Performing traceroute.  String = %@\n",words);

return((NSString *)@"..proper route being taken..");
}
@end

I was also able to call the do_trace and pass from the client a large string value with no problem.  

One more thing.  As you can see above, through you advice, I found that I have no problems return()'ing an NSString.  If I want to return multiple pieces of data I'm guessing that is when I need to use Marshalling/Archiving and UnArchiving.  I'd create a structure (or object) to hold the pieces of data I want to return.  I'd then send it through a Coder to Archive it then use the return() call to return the Archived value and then Unarchive it on the client side?   I haven't seen any examples of the on the net (using DO) or the books I have.  

My books do not have a good section on Marshalling/Archiving with DO -- could you give me the name of the Big Nerd book???  Also, I would very much like to see your research on NSDistantObjects.

Again, you have been very helpful, thank you.

Dalton Hamilton


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

References: 
 >Distributed Objects (From: Dalton Hamilton <email@hidden>)
 >Re: Distributed Objects (From: email@hidden)
 >Re: Distributed Objects (From: Daniel Jalkut <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.