Re: Writing string to pasteboard on 10.5 causes crash
Re: Writing string to pasteboard on 10.5 causes crash
- Subject: Re: Writing string to pasteboard on 10.5 causes crash
- From: "email@hidden" <email@hidden>
- Date: Mon, 1 Mar 2010 16:47:31 +0000
On 1 Mar 2010, at 16:43, Abhinay Kartik Reddyreddy wrote:
>>>
>> Try preparing the pasteboard first with either of the following:
>>
>> - (NSInteger)clearContents
>
> looks like this is the available only on SL. how to clear a pasteboard in Leopard ?
Yes. Sorry about that. 10.6 only.
>
>> - (NSInteger)declareTypes:(NSArray *)newTypes owner:(id)newOwner
>
> ownership could be a reason, the attempt to write to pasteboard is failing.
>
Docs for declareTypes:owner: says
Mac OS X v10.5 and earlier: In Mac OS X v10.5 and earlier, this method is the first step in writing data to the pasteboard and must precede the messages that actually write the data. A declareTypes:owner: message essentially changes the contents of the receiver: It invalidates the current contents of the receiver and increments its change count.
I have previously omitted this when utilising the pasteboard and suffered accordingly.
Regards
Jonathan Mitchell
Developer
http://www.mugginsoft.com
_______________________________________________
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