Check-in [dc6a1e6865]

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

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

Overview
Comment:Tab
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: dc6a1e6865a6b29d8e2fd8628d81c529698c2901d7c8397e4bb0735096f5ab1d
User & Date: kevin_walzer 2019-04-11 12:29:47
Context
2019-04-12
12:33
Added impl link for 262 check-in: 45c21d6c8e user: dkf tags: trunk
10:25
Contributed index generation script from Jeff Rogers. Thanks! check-in: d13f0cd032 user: dkf tags: evilotto-index
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
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
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. 






|







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.