ztcl::location request
Asks the user for the permission.
ztcl::location request -command SCRIPT
Description
Gives a handle, and shows the dialog of the OS when the permission is undetermined. SCRIPT runs one time with {permission granted} or {permission denied} appended, from the event loop, and the handle ends. get and watch also ask when the permission is undetermined; request picks the moment of the dialog.
Returns
A handle, such as location1.
Examples
% catch {ztcl::location request -command puts} msg; set msg
the location is not available on this platform
Errors
% ztcl::location request
wrong # args: should be "ztcl::location request -command script"
-errorcode TCL WRONGARGS
% ztcl::location request -accuracy best -command puts
bad option "-accuracy": must be -command
-errorcode NONE
Facts
- Capability
location. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.6