gisle / tcl.pm

Tcl extension module for Perl
http://search.cpan.org/dist/Tcl
9 stars 8 forks source link

status of fileevent support? (for use with Tcl::pTk) #14

Closed chrstphrchvz closed 6 years ago

chrstphrchvz commented 6 years ago

I came across an issue using fileevent from Tcl::pTk on macOS, which I've documented here: https://rt.cpan.org/Ticket/Display.html?id=125662

I noticed there's comments in Tcl::pTk's fileevent suggesting it be rewritten, since it has known shortcomings (e.g. only supporting 'readable', relies on polling interval). Another suggestion it makes is for Tcl.pm to support CreateFileHandler.

But do Tcl::Tk and/or Tkx already allow using fileevent 'as-is' through Tcl.pm? (I haven't yet successfully tried; is there a readily available example somewhere?) If that's the case, then I'm wondering if it's a matter of making Tcl::pTk recognize fileevent as something it should just pass through to Tcl.pm if it's syntax is sufficiently compatible with Perl/Tk's.

vadrer commented 6 years ago

I haven't tried tcl/tk's fileevent, and actually I have no much plans on doing so. The reason is that I mostly use tcl/tk for GUI, and perl for IO;

however it is possible to use tcl/tk's fileevent, but in this case we should expect for it to perform said IO. problem with Tcl::pTk could be that it should "join" perl IO and tcl/tk IO; which is not very easy, plus I do not foresee much benefits from doing so.

PS, this discussion is more proper for the mailing list, which was specially created for such purposes, where you can discuss all related modules altogether: Tck::Tk, Tcl::pTk and Tkx

chrstphrchvz commented 6 years ago

Thanks for pointing out the mailing list, I'll need to check if that's documented in Tcl::pTk. I'm guessing you mean the tcltk list on perl.org since that's where you're active; though it looks like there's another separate list on Sourceforge

chrstphrchvz commented 6 years ago

Continuing discussion on mailing list as suggested: https://www.mail-archive.com/tcltk@perl.org/msg00749.html