Re: PerlTK's ->clipboardAppend in OSX...?

2006-05-05 Thread Jay Savage

On 5/4/06, Michael <[EMAIL PROTECTED]> wrote:

[snip]


> Correct. Quartz and X11 have different (actually, at least 3)
> clipboard systems that aren't shared. You can get around this by using
> "copy" in the X11.app munbar at the top of the screen. but in order to
> manage this clipboards entirely from within X11 (TK), you're going to
> need help. See the xcutsel application that's part of the standard X11
> build, or autocutsel from Fink. Alternatively, you can use XDarwin
> instead of the Apple X11 port. Recent versions of XDarwin synchronize
> the clipboards...most of the time. Note that Quartz does a good job of
> reading the X11 clipboard. Items cut in X11 should be available to

> Quartz apps. It's just doesn't work the other way around.

>



if it is possible to synchronize the clipboards...


Yes, see the man pages for the programs I mentioned.

perhaps this can be

done when the PerlTK methods which add or retrieve data from the
clipboard are called?


No. This isn't a TK issue. This is a window manager issue. TK only
knows about the clipboard for the window manager/server it is running
under. No X11 application can see the OSX clipboard. It doesn't matter
whether they are TK, Qt, or GTK applications.

Perhaps the developers of PerlTK can address this

issue...?



Again, this has nothing to do with PerlTK, or even TK. Apple would
need to add support for the the Quartz clipboard to it's X11
distribution. If this really bothers you, talk to Apple. Or use
XDarwin instead of Apple's X11.

xcutsel and autocutsel do provide workarounds, though. Just add the
appropriate commands as callbacks on you cut and paste routines.

Alternatively, since the Finder is scriptable, you could probably use
Mac::Glue or a call to osascript to pass the values from the X11
clipboard to the quartz clipboard.

There are lots of solutions here, but none of them are built into TK,
nor can they be. If you want your program to interface with an
environment other than the one TK is running ni, it's up to you to
make the links.

If interoperability is important to you and the less-than-elegant
solutions available don't appeal to you, you could port the program to
CamelBones, which is a framework for building Cocoa applications in
Perl.

HTH,

-- jay
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


Re: PerlTK's ->clipboardAppend in OSX...?

2006-05-05 Thread Michael

Jay Savage wrote:

On 5/3/06, Michael <[EMAIL PROTECTED]> wrote:

Hello,

Anyone have trouble copying things to the clipboard using PerlTK's
->clipboardAppend...?  When I use it to put things in the clipboard, I
cannot paste the contents into other OSX apps like Textedit.  The
"Paste" option is available in the application, however no data appears
when one pastes.



Correct. Quartz and X11 have different (actually, at least 3)
clipboard systems that aren't shared. You can get around this by using
"copy" in the X11.app munbar at the top of the screen. but in order to
manage this clipboards entirely from within X11 (TK), you're going to
need help. See the xcutsel application that's part of the standard X11
build, or autocutsel from Fink. Alternatively, you can use XDarwin
instead of the Apple X11 port. Recent versions of XDarwin synchronize
the clipboards...most of the time. Note that Quartz does a good job of
reading the X11 clipboard. Items cut in X11 should be available to
Quartz apps. It's just doesn't work the other way around.

HTH,

-- jay
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


if it is possible to synchronize the clipboards...  perhaps this can be 
done when the PerlTK methods which add or retrieve data from the 
clipboard are called?  Perhaps the developers of PerlTK can address this 
issue...?