Jonathan, That was the answer. I've used this method in other places in the app where I have used my own pasteboard types, but I somehow thought (probably from the name of the method) that I didn't need it if I was using a built-in pasteboard type.
Anyway, thanks again! Martin On Mar 1, 2010, at 5:47 PM, [email protected] wrote: > > 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 protected]) > > 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/martin.hewitson%40aei.mpg.de > > This email sent to [email protected] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Martin Hewitson Albert-Einstein-Institut Max-Planck-Institut fuer Gravitationsphysik und Universitaet Hannover Callinstr. 38, 30167 Hannover, Germany Tel: +49-511-762-17121, Fax: +49-511-762-5861 E-Mail: [email protected] WWW: http://www.aei.mpg.de/~hewitson ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ Cocoa-dev mailing list ([email protected]) 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/archive%40mail-archive.com This email sent to [email protected]
