From: Joshua J. <jj...@gm...> - 2009-10-19 04:35:03
|
On Oct 18, 2009, at 1:07 PM, Ronald P. Regensburg wrote: > Tested the TESyncScrap extension in 9.0.4 in the older SheepShaver > build and in todays build with the fix by Alexei. > > The extension does not change copy and paste behaviour in either build > (with the most serious problems fixed in the last build as I described > earlier today) but it adds a problem with SimpleText. With the > extension installed, copying in SimpleText causes a system crash and > subsequent SheepShaver crash, thus preventing the only way one can > copy from within SheepShaver and paste in MacOSX. Thanks for your report. I was able to reproduce the crash and determine the cause.[1] I've uploaded a new version that fixes the problem. TESyncScrap http://jjuran.dyndns.org/~jjuran/experimental/TESyncScrap.mbin Apparently some applications (including SimpleText) have taken their own measures to deal with the issue. I tested the scrap synchronization behavior of several TextEdit-based applications with and without TESyncScrap installed: Without TESyncScrap: BBEdit width both synced SimpleText both synced Finder 9.0 both synced Finder 7.5.6 synced paste (copy empties the OS X pasteboard) Get Info synced paste (copy empties the OS X pasteboard) Notepad synced copy Stickies nil * 'Finder' refers to the Finder's filename editor * 'Get Info refers to the filename and comment fields in the Finder's Get Info windows * SimpleText and Stickies' respective behavior is unchanged between System 7.6.1 (in Basilisk II) and Mac OS 9.0.4 * BBEdit 5.1, Edit->Preferences->Editor->Wrap To->Width With TESyncScrap installed, Notepad and Stickies synchronize in both directions, but the Finder is unaffected. TESyncScrap only affects TextEdit-based fields (and not e.g. WASTE editors), and only solves the problem of a layer switch being required to synchronize the scrap. The Finder is not an exception here, since after switching to another application inside the emulator pasting to OS X still fails. Perhaps the Finder is putting another scrap flavor after 'TEXT' and it's running afoul of the ZeroScrap() issue. [1] The templates I use for trap patches need to generate glue for each patch installed. After refactoring the code earlier this year, the glue was generated only for each *function* used as a patch. Since TESyncScrap uses the same function to patch TECut() and TECopy (), and TECut() was installed later, TECopy()'s patch glue got munged. The glue is now unique per trap/function pair. >> On Sun, Oct 18, 2009 at 11:40 AM, Joshua Juran <jj...@gm...> >> wrote: >> On Oct 18, 2009, at 6:50 AM, Ronald P. Regensburg wrote: >> >>> I built SS MacOSX from current CVS (Intel only and I forgot to >> reverse >>> the SDL-audio patch). >>> >>> Clearly improved (tested with AppleWorks, Tex-Edit Plus and >> SimpleText >>> in MacOS9): >>> - Copying and pasting of styled text between different applications >>> within MacOS9 in SheepShaver works (when copied from SimpleText, >>> styles are lost) >>> - Copying and pasting of styled text from MacOSX to MacOS9 in >>> SheepShaver works (with anomalies when pasted in SimpleText) >>> - Copying and pasting from MacOS9 in SheepShaver to MacOSX works >> only >>> when copied from a SimpleText document and with styles lost. >> >> One of the issues you and others may have run into is the latency >> occurring between use of the TextEdit scrap and synchronization with >> the desk scrap, i.e. the clipboard. Prior to Carbon, developers were >> instructed to synchronize the two scraps on layer switch -- when an >> application became or ceased to be frontmost. The problem with this >> approach is that it doesn't play well with screen-in-a-window >> arrangements where switching to another app in OS X doesn't cause an >> OS 9 layer switch and consequently gets stale clipboard data. >> >> I've written a system extension called TESyncScrap that patches TECut >> () and TECopy() to flush the TE scrap and TEPaste() to update it. I >> invite you to try it out and see if it's useful. The source code is >> also available.[1] >> >> TESyncScrap >> http://jjuran.dyndns.org/~jjuran/experimental/TESyncScrap.mbin >> >> TESyncScrap.cc >> <http://github.com/jjuran/metamage_1/blob/ >> bd25287ac1551371da0fcf4fd9815b5d14e707db/pedestal/Hacks/TESyncScrap/ >> TESyncScrap.cc> >> >> You'll need a MacBinary decoder. There are several in the >> 'experimental' directory. >> >> Josh >> >> [1] The location may move as things get reorganized, but it will >> remain on github. |