Check-in [78ebdca682]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarify variable in TIP 536 per comment by aku
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:78ebdca6822072818a63d511751a5fb35fdac820bd8bff1b90e3646f2af1e081
User & Date: kevin_walzer 2019-04-11 12:29:17
Context
2019-04-11
12:29
Tab check-in: dc6a1e6865 user: kevin_walzer tags: trunk
12:29
Clarify variable in TIP 536 per comment by aku check-in: 78ebdca682 user: kevin_walzer tags: trunk
2019-04-10
19:52
New TIP: Externalize libtommath check-in: 4ddb2570c5 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tip/536.md.

23
24
25
26
27
28
29

30
31
32
33
34
35
36
The following commands, which will all be documented in the tk::mac section of the Tk man page, will be added with this TIP: 

## ::tk::mac::PerformService

Executes a Tcl procedure called from the macOS "Services" menu by another application in the Apple menu item. The "Services" menu item allows for inter-application communication; data from one application, such as selected text, can be sent to another application for processing, for example to Safari as a search item for Google, or to TextEdit to be appended to a file. Tk will includes a stub version of this command that displays a dialog with the data sent. This procedure should be rewritten in an application script for customization, which will allow a Tk application to expose "Service" functionality to other programs: 

	proc ::tk::mac::PerformService {} {

		set data [clipboard get]
		$w insert end $data
	}
	
Note that the mechanism for retrieving inter-application data is from the clipboard; there is no other supported way to obtain the data. If the Services process is not desired, the NSServices keys can be deleted from the application's Info.plist file. 

The underlying code supporting this command also allows the text, entry and ttk::entry widgets to access/consume services from other applications via the Services menu. 







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
The following commands, which will all be documented in the tk::mac section of the Tk man page, will be added with this TIP: 

## ::tk::mac::PerformService

Executes a Tcl procedure called from the macOS "Services" menu by another application in the Apple menu item. The "Services" menu item allows for inter-application communication; data from one application, such as selected text, can be sent to another application for processing, for example to Safari as a search item for Google, or to TextEdit to be appended to a file. Tk will includes a stub version of this command that displays a dialog with the data sent. This procedure should be rewritten in an application script for customization, which will allow a Tk application to expose "Service" functionality to other programs: 

	proc ::tk::mac::PerformService {} {
	    set w [pack [text .t]]
		set data [clipboard get]
		$w insert end $data
	}
	
Note that the mechanism for retrieving inter-application data is from the clipboard; there is no other supported way to obtain the data. If the Services process is not desired, the NSServices keys can be deleted from the application's Info.plist file. 

The underlying code supporting this command also allows the text, entry and ttk::entry widgets to access/consume services from other applications via the Services menu.