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

2006-05-06 Thread Michael




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.



I believe you are asserting here that, PerlTK can not (or should not) 
concern itself with individual platform issues to which it is ported.  I 
respectfully do not agree.  Additionally I notice the developers of 
PerlTK do not agree.  For example, they appear to have made many 
accommodations for Microsoft Windows.  I draw your attention to the 
Tk-804.027 source files in the directory Tk-804.027/pTk/mTK/win.  Take 
a look at the tkWinPort.h header file in that directory.


The PerlTK developers make calls to Windows DLL's, they might want to 
make a call to OSX libs to make all PerlTK's features work more 
seamlessly with the native GUI.  The developers seem to have lumped OSX 
into the same category as Unix/X.   This is perhaps not the correct 
thing to do.  While OSX runs X, it's primary GUI is not X.


Making sure all function calls work well in each target environment make 
PerlTK a more attractive development tool.  Standing back and taking the 
not my responsibility attitude doesn't help the cause.  Solving the 
problem by adding code to each PerlTK program written is not efficient.


Regards,


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

2006-05-06 Thread Joel Rees


On 2006.5.6, at 07:07 AM, Michael wrote:




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.


I believe you are asserting here that, PerlTK can not (or should not) 
concern itself with individual platform issues to which it is ported.  
I respectfully do not agree.


So, do you have some code to start the subproject with? Are you 
volunteering to lead it? Or maybe to administer the mail list if 
someone else leads the project?


All that aside, the current status is as Jay described, and if you are 
in a hurry to get something running, CamelBones is available now. 
Tcl/Tk is also available in a package tuned for Aqua, but I do not know 
how well the paste buffers are integrated there. But that's also for 
another mail list.


[...]



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...?


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-04 Thread Jay Savage

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!


PerlTK's -clipboardAppend in OSX...?

2006-05-03 Thread Michael

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.


Additionally, I get the same results when I use the context menus for 
-Scrolled to copy text to the clipboard?


Apologies if this has been discussed before.


Regards,