[squeak-dev] drag/drop events fro dragging from applications?

Tobias Pape Das.Linux at gmx.de
Wed Jul 17 22:25:45 UTC 2019


> On 18.07.2019, at 00:04, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 2019-07-17, at 2:23 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
>> 
>> What works is dropping files. Just tested with a TXT file.
> 
> Yup, that stuff has worked for years - maybe decades; I recall having fun doing the RISC OS vm part a looooooooong time ago.
> 
> 
> 
>> NOTE the next is OSX (or macOS) specific. The world is completely different with holes in Walls and penguins (let alone, demons and pufferfishes)
> 
> I do not like Holes in Walls. Not one little bit. At least if I run it in VMWare on my mac  I can kill it easily.
> 
>> 
>> Dragging an email directly has not worked for me.
>> Reading the code in platforms/iOS/vm/OSX/sqSqueakOS*View.m, specifically -filterOutSqueakImageFilesFromDraggedFiles: (which is the same in all implementations *hint hint*)
>> it seems we filter out anything in dragged stuff that is _NOT_ filenames:
>> 
>> 
>> 	if ([[pboard types] containsObject: NSFilenamesPboardType]) {
>> 		NSArray *files= [pboard propertyListForType: NSFilenamesPboardType];
>> 		NSString *fileName;
>> 		for (fileName in files) {/*...*/
>> 
>> 
>> While this (NSFilenamesPboardType) is already deprecated since *rustling* exactly 10 years![1] and we should use 
>> a completely different API [2], we still have to deal with the fact, that files look different when dragging:
> 
> Well that's all going to be *such* fun, isn't it? It turns out that we're not the only ones with issues to fix though; if you drag an email directly to TextWrangler, for example, it only reads the email subject line... ooh, just worked out that option-click/drag will drop the whole raw text into TW. Interesting... so there may be options. 
> Sadly, if it involves noticeable VM work across platforms I don't think I'm going to get a chance to do anything about it.

If just we could register custom urls (we already have some in the info.plist) on the fly so that you could say "yup, if someone is clicking a timsawesomelicense://PCFET0NUWVBFIGh0bWw+PHRpdGxlPmg8L3RpdGxlPjxwPmhlbGxvLCB3b3JsZDwvcD4K link, fire up squeak and here we go"…

-t

> 
> tim





More information about the Squeak-dev mailing list