Login  •  Register


The time is now: Thu Oct 19, 2017 2:34 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 9 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Mon Jul 10, 2017 7:51 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 728
This problem occurs in SheepShaver running 9.0.4. It does NOT occur in Qemu running 9.2.

When I work in Script Debugger (see another thread about that wonderful program), I can paste into a Script Debugger editing window, but I can't copy anything from the window. If I copy from the editing window, the clipboard reports that it contains styled text, but the clipboard is actually empty.

EDIT: See below for more detail. This is a problem with any application that copies styled text to the clipboard under SheepShaver.


Last edited by emendelson on Tue Jul 11, 2017 2:51 pm, edited 2 times in total.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 11, 2017 2:42 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 728
It turns out that this is a problem with any application running under SheepShaver that tries to copy "styled text" to the clipboard. If you format some text in ClarisWorks, for example, and copy it to the clipboard, you get an empty clipboard.

So it's a SheepShaver but that will presumably never be fixed, alas.

EDIT: There's a patch here for copying styled text to the HOST clipboard from SheepShaver/BasiliskII under BEOS, but it doesn't seem to apply to this issue:

https://github.com/cebix/macemu/commit/ ... 7fd96e85cd

EDIT: And the relevant patches already seem to be in the code that I've been building...


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 11, 2017 9:50 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4812
Location: Amsterdam, Netherlands
emendelson wrote:
It turns out that this is a problem with any application running under SheepShaver that tries to copy "styled text" to the clipboard. If you format some text in ClarisWorks, for example, and copy it to the clipboard, you get an empty clipboard.


I have been discussing this issue and similar clipboard oddities in SheepShaver years ago and at the time found some (convoluted) workarounds. But I forgot the specifics and I do not even remember where I had this discussion and with whom. Could have been here, or in cebix/macemu, or in the old B2-devel mailing list, or in an email exchange. When I have the time, I will try to recover the discussion. With a simple search here I cannot find it.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 11, 2017 9:52 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 728
Ronald P. Regensburg wrote:
emendelson wrote:
It turns out that this is a problem with any application running under SheepShaver that tries to copy "styled text" to the clipboard. If you format some text in ClarisWorks, for example, and copy it to the clipboard, you get an empty clipboard.


I have been discussing this issue and similar clipboard oddities in SheepShaver years ago and at the time found some (convoluted) workarounds. But I forgot the specifics and I do not even remember where I had this discussion and with whom. Could have been here, or in cebix/macemu, or in the old B2-devel mailing list, or in an email exchange. When I have the time, I will try to recover the discussion. With a simple search here I cannot find it.


Thank you for looking for this - I certainly haven't found anything here, and the only thing I found on cebix/macemu was the fix for BeOS. Anything you can find would be worth having.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jul 11, 2017 10:58 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1795
Ronald P. Regensburg wrote:
emendelson wrote:
It turns out that this is a problem with any application running under SheepShaver that tries to copy "styled text" to the clipboard. If you format some text in ClarisWorks, for example, and copy it to the clipboard, you get an empty clipboard.


I have been discussing this issue and similar clipboard oddities in SheepShaver years ago and at the time found some (convoluted) workarounds. But I forgot the specifics and I do not even remember where I had this discussion and with whom. Could have been here, or in cebix/macemu, or in the old B2-devel mailing list, or in an email exchange. When I have the time, I will try to recover the discussion. With a simple search here I cannot find it.



I think it was on the mailing list IIRC.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 30, 2017 6:47 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4812
Location: Amsterdam, Netherlands
I found the discussion, which was mostly about the 64-bit SheepShaver that does not run on later OSX hosts. It was so complicated that I have difficulty to understand it again myself, but it seems that in classic MacOS there is not one clipboard, but several clipboards that do not cooperate nicely in the emulator.

It depends on in which application you copy and were you want to paste.

For instance, in 32-bit SheepShaver:

Styled text copied in CW/AW will not show on the clipboard (as viewed from the Finder Edit menu) but it can be pasted in SimpleText and will show styles in as far as SimpleText can show styles.

Again copied from SimpleText, it will appear on the clipboard, albeit without styles. And it can be pasted as such anywhere, also in the host.

Styled text that is copied in CW/AW can also be pasted in Tex-Edit Plus. When again copied in Tex-Edit Plus it will appear with styles on the clipboard and can be pasted with styles in several other applications. But it will not appear at all on the host's clipboard.


Last edited by Ronald P. Regensburg on Thu Aug 31, 2017 6:51 am, edited 2 times in total.
corrected "Edit" menu


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 30, 2017 7:44 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 728
Ronald, you're right! Excellent discovery. To repeat it in brief:

If you copy text from Script Debugger etc. in SheepShaver, the way to paste it into an application that expects styled text is to first paste it into something like SimpleText or any other text editor, then copy it again to the clipboard. The copied text can then be pasted back into Script Debugger, etc. as plain text.

Presumably an AppleScript could be set up to do the job of copying/pasting into a text editor/cutting from the text editor, etc.

Incidentally, this clipboard problem does NOT occur with SheepShaver for Windows.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 31, 2017 7:04 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4812
Location: Amsterdam, Netherlands
When you install Tex-Edit Plus 4.1.3 in MacOS9 and use that as intermediate text editor, styles will be preserved. And Tex-Edit Plus is scriptable.

http://www.tex-edit.com


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Sep 02, 2017 12:23 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 728
It turns out that you don't need a scriptable text editor to copy styled text to the clipboard as text so that it can be pasted elsewhere. This code fragment script does the job (you lose styles, but you can at least paste the text):

Code:
if first window exists then
    set theDocument to first document
    set theText to selection of theDocument as string
    if theText is not "" then set the clipboard to theText
end if


As written, that works from the Script menu in Script Debugger. It should be easily adaptable to anything else.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 9 posts ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group