Re: Image viewing - a different approach
- From: ZB <zbREMOVE_THIS@xxxxxxxxxxxxxxxxxxxx>
- Date: 22 Jan 2008 19:10:27 GMT
Dnia 22.01.2008 Glenn Jackman <glennj@xxxxxx> napisał/a:
namespace eval launch {
switch -glob -- $::tcl_platform(os) {
Darwin { set start_cmd open }
"Windows *" { set start_cmd start }
default {
# need more expertise here...
error "don't know how to launch a file on os $::tcl_platform(os)"
}
}
variable launch_cmd [auto_exe*** $start_cmd]
}
proc launch::file {filename} {
variable launch_cmd
eval exec [list $launch_cmd $filename &]
}
launch::file myimg.jpg
If I properly understood, it's a method for platform-independent "launch"
("run", "exec"... whatever) command. But my intention was somewhat
different: I would to create some kind of "link", which could be then
pack-ed anywhere in chosen toplevel - and such link, when clicked by the
user, would then be seen by OS as "shortcut to file"; exactly the same
kind of shortcut, as every Windows user has his desktop filled with.
Such way we don't have to care about file type, launch command and other
details anymore... everything has been set much earlier by the user,
according to his needs.
This would be best solution for both programmer (less work, of course...),
and the user (less work by setup/configuration, of course... all is prepared
already along with his OS's file associations).
I'm not sure, is it currently possible at all. If not - perhaps could be
*something* added in future versions of Tk?
--
ZB
.
- Follow-Ups:
- Re: Image viewing - a different approach
- From: EKB
- Re: Image viewing - a different approach
- From: Glenn Jackman
- Re: Image viewing - a different approach
- From: Bryan Oakley
- Re: Image viewing - a different approach
- References:
- Image viewing - a different approach
- From: ZB
- Re: Image viewing - a different approach
- From: Larry W. Virden
- Re: Image viewing - a different approach
- From: ZB
- Re: Image viewing - a different approach
- From: Glenn Jackman
- Image viewing - a different approach
- Prev by Date: Re: Image viewing - a different approach
- Next by Date: Change Request TK 8.5 and 8.4 AQUA
- Previous by thread: Re: Image viewing - a different approach
- Next by thread: Re: Image viewing - a different approach
- Index(es):