From: Kevin W. <kw...@co...> - 2025-08-17 04:05:07
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Who uses send on macOS? I thought it was no-op on Aqua. And wasn’t send disabled on win32 because its COM-based implementation wa deemed a security risk? </div><div dir="ltr"><br><blockquote type="cite">On Aug 16, 2025, at 11:40 PM, Marc Culler <cul...@gm...> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Erik,</div><div><br></div><div>I now think that much of what I said about the consequences of having a unique NSApplication object is wrong. I think there is actually no obstacle to implementing a send command on macOS which can send commands to interpreters in a different Wish process. The only problem is that no one ever wrote such an implementation.</div><div><br></div><div>- Marc</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Aug 16, 2025 at 7:17 AM Marc Culler <<a href="mailto:cul...@gm...">cul...@gm...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Apple does provide IPC mechanisms. I don't know whether they would be suitable, but I am pretty sure they would. However, the current implementation of [send] does not attempt to use them. If you look at the top of macosx/TkMacOSXSend.c you will see this very old comment (note that "gestalts" no longer exist in macOS):</div><div><br></div><div> * This file provides procedures that implement the "send" command,<br> * allowing commands to be passed from interpreter to interpreter. This<br> * current implementation for the Mac has most functionality stubbed out.<br> *<br> * The current plan, which we have not had time to implement, is for the<br> * first Wish app to create a gestalt of type 'WIsH'. This gestalt will<br> * point to a table, in system memory, of Tk apps. Each Tk app, when it<br> * starts up, will register their name, and process ID, in this table.<br> * This will allow us to implement "tk appname".<br> *<br> * Then the send command will look up the process id of the target app in<br> * this table, and send an AppleEvent to that process. The AppleEvent<br> * handler is much like the do script handler, except that you have to<br> * specify the name of the tk app as well, since there may be many<br> * interps in one wish app, and you need to send it to the right one.<br> *<br> * Implementing this has been on our list of things to do, but what with<br> * the demise of Tcl at Sun, and the lack of resources at Scriptics it<br> * may not get done for awhile. So this sketch is offered for the brave<br> * to attempt if they need the functionality...</div><div><br></div><div>- Marc</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 16, 2025 at 1:17 AM Donal Fellows <<a href="mailto:don...@ma..." target="_blank">don...@ma...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div> <div dir="ltr"> <div style="font-size:11pt;color:rgb(0,0,0)"> I would be very startled if it <i>isn't</i> the exact same issue, a combination of needing a suitable IPC mechanism for doing the discovery and communications, and system policy restricting access to such things even if they exist.</div> <div id="m_1999416157882977360m_-833440576428981616appendonsend"></div> <div><br> </div> <div style="font-size:11pt;color:rgb(0,0,0)"> Donal.</div> <div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <hr style="display:inline-block;width:98%"> <div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <b>From:</b> Erik Leunissen via Tcl-Core <<a href="mailto:tcl...@li..." target="_blank">tcl...@li...</a>><br> <b>Sent:</b> Saturday, August 16, 2025 07:12<br> <b>To:</b> Marc Culler <<a href="mailto:cul...@gm..." target="_blank">cul...@gm...</a>><br> <b>Cc:</b> <a href="mailto:tcl...@li..." target="_blank">tcl...@li...</a> <<a href="mailto:tcl...@li..." target="_blank">tcl...@li...</a>><br> <b>Subject:</b> Re: [TCLCORE] Advice requested regarding [send] on macOS </div> <div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style="font-size:11pt">Related to this matter: I noticed (in a debug statement issued by me for execution at Github) that<br> interpreters in another process are not returned by [winfo interps] on macOS. (See the script below<br> to verify that). I'm suspecting that this is for the<br> very same reason/cause. Can you please give your view about that (confirm/deny if<br> possible) ?<br> <br> </div> </div> </div></blockquote></div> </blockquote></div> <span>_______________________________________________</span><br><span>Tcl-Core mailing list</span><br><span>Tcl...@li...</span><br><span>https://lists.sourceforge.net/lists/listinfo/tcl-core</span><br></div></blockquote></body></html> |