What's purpose of this code

27 views
Skip to first unread message

Patrick Robertson

unread,
Sep 11, 2015, 8:12:11 AM9/11/15
to quicksilver-...@googlegroups.com
I just got a hang on this line of the code: [1]
The hang was from calling LSCopyItemInfoForURL()


I was looking at the if statement and what it does, but couldn’t figure out the purpose of it. It seems to be for text clippings/web clippings etc. but the corresponding code never gets run ([2]) because [pasteboard types] always returns an empty array, so that for loop never gets run.Can anybody figure out the purpose of this code, and in what situations it might get run? Short of that, I’ll just remove it and hopefully fix a hang :S





I prefer to use encrypted email. You can find my public key here.
Learn how to encrypt your email with the Email Self Defense Guide

Rob McBroom

unread,
Sep 12, 2015, 8:57:57 AM9/12/15
to quicksilver-...@googlegroups.com
On 11 Sep 2015, at 8:11, Patrick Robertson wrote:

> I was looking at the if statement and what it does, but couldn’t
> figure out the purpose of it.

Just from the names of the methods, I think it’s trying to get the
string value of the text in the clipping so you can use it with all the
text actions.

> It seems to be for text clippings/web clippings etc. but the
> corresponding code never gets run ([2]) because [pasteboard types]
> always returns an empty array, so that for loop never gets run.

It’s always empty? Seems like it’s supposed to get populated by
`pasteboardByFilteringClipping:` in NSPasteboard_BLTRExtensions.m. Have
you tried stepping through it?

--
Rob McBroom
http://www.skurfer.com/
Reply all
Reply to author
Forward
0 new messages