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: Attributed Strings in Distributed Objects



On 5 Sep 2007, at 14:34, Gerriet M. Denkmann wrote:

... -[SWDocument doButton:] will do: [ proxy dummyWithStyle: YES ] in main thread 0x306cf0
... -[SXLeaf dummyWithStyle:] will return "with Style" in thread 0x3a0300


Now the app is not crashing at all, it just hangs.
When I run it under the debugger and hit the "Pause" button, then I will see the stack as quoted.

What is the other thread actually doing when this happens? (i.e. you need to get the backtrace from the other thread as well, not just the backtrace from your main thread... all that's telling you is that it's trying to send a message over DO and isn't getting a reply).


I just got some other idea and made myself a new method:
- (NSData *)archivedDummyWithStyle: (BOOL)withStyle ;
{
	// ... same as before in dummyWithStyle:
	// followed by:
	NSData *c = [NSArchiver archivedDataWithRootObject: a];
	return c;
}

And now I can get my attributed strings with or without paragraph styles. Might take a few extra milliseconds, but I don't care.

:-) It probably doesn't take significantly longer, actually, since DO would have been doing something very similar before (just using NSPortCoder rather than NSArchiver), and archiving an NSData object is likely to be very fast.


Anyway, it's good that you've found a workaround.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Attributed Strings in Distributed Objects (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Attributed Strings in Distributed Objects (From: Alastair Houghton <email@hidden>)
 >Re: Attributed Strings in Distributed Objects (From: "Gerriet M. Denkmann" <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.