[squeak-dev] Re: Extended Clipboard

John M McIntosh johnmci at smalltalkconsulting.com
Fri Dec 31 18:08:16 UTC 2010


Further to this 
you should look at 

iOS/plugins/clipboardExtended/sqMacExtendedClipboard.m

since that is a more mature version of the code created when I was doing the iOS  iphone & cocoa port

On 2010-12-31, at 10:02 AM, John M McIntosh wrote:

> The original code, change sets, sunits too. are in 
> platforms/Mac OS/plugins/ClipboardExtended
> 
> At some point the unix code *appeared*
> 
> The pharo.extendedClipboard.2.zip is about the 4th rewrite to tackle getting stuff from the clipboard. I note it uses FFI with windows and cheerfully allows 
> copy/paste of "Graphics" thingees on that platform. 
> 
> On os-x it is a bit more complicated since microsoft office for example when you copy text data from a page it:
> puts the text there as utf8, utf16, rtf, wordsomething, TIFF! (maybe jpeg too).     
> 
> In this case we actually see textual data and a screen shot of the page! But what to do?  In Sophie how we solved that was that we knew what the target 
> paste entity was, so we just decided if you were pasting into a graphics target then it was a graphics object, or if into a blank area it was graphics.  However
> if it was a text area, then you wanted the text object.
> 
> Other issues like if you select a file and copy via the finder that results in a text object, (the file name),  graphic (the icon), and a URI & other constructs to indicate it's a file object...  MMm that was a bit tricky and we decided likely you wanted to paste the contents of the file. 
> 
> On 2010-12-31, at 6:51 AM, Andreas Raab wrote:
> 
>> On 12/31/2010 2:34 PM, Esteban Lorenzano wrote:
>>> it is (was) a changeset inside unix source structure... it is integrated to VMMaker since 207.
>> 
>> Thanks. But oh boy. This is the kind of code that makes me want to just break down and cry. Not a single comment. Not a single test. Not even indented.
>> 
>> But enough of that. What exactly does "creating" a clipboard mean? Opening the system default clipboard (then why is this called "creating" a clipboard? and why is it necessary at all?) or really creating a new, private clipboard (then where is the appropriate close/destroy method? and why would we want to create a private clipboard - shouldn't we be using the system default one to allow interactions with other apps?). And what are the format strings supposed to be? Mime types?
>> 
>> Cheers,
>> - Andreas
>> 
>>> El 31/12/2010, a las 10:15a.m., Andreas Raab escribió:
>>> 
>>>> On 12/31/2010 12:32 PM, Bert Freudenberg wrote:
>>>>> We use the extended clipboard plugin in Etoys. Copying/pasting bitmaps or rich text between apps works nicely (on Mac and Unix anyway, Windows remains to be implemented).
>>>> 
>>>> So where *is* that plugin? I've only pointed this out three times in the past, but I can't seem to find any source code regarding this mythical plugin. There is nothing in VMMaker, there is nothing in squeakvm.org, so where is it?
>>>> 
>>>> Cheers,
>>>> - Andreas
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
> 
> 
> 
> 

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================







More information about the Squeak-dev mailing list