Re: Attributed Strings in Distributed Objects
Re: Attributed Strings in Distributed Objects
- Subject: Re: Attributed Strings in Distributed Objects
- From: Alastair Houghton <email@hidden>
- Date: Wed, 5 Sep 2007 19:12:11 +0100
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:
This email sent to email@hidden