From: Vince Darley (vince@santafe.edu)
Date: 13 Mar 01, 09:58 EST
From: Vince Darley <vince@santafe.edu>
Subject: Re: Option-click title bar has a bug in Tcl mode
Yeah, you're right. Perhaps what I should have tried was:
proc ::OptionTitlebarSelect {item} {
set obviousChoice [file join [file dirname [win::Current]] $item]
if {[file exists $obviousChoice]} {
if {$obviousChoice == [win::Current]} {
return
} elseif {[file isdirectory $obviousChoice]} {
file::showInFinder $obviousChoice
} else {
file::tryToOpen $item
}
} else {
file::tryToOpen $item
}
}
-- Vince
<http://www.santafe.edu/~vince>
On Mon, 12 Mar 2001, Bernard Desgraupes wrote:
> Vince Darley wrote:
> >
> > Ok, that code is purposefully ignoring the current window. Perhaps the
> > best fix is to replace 'proc ::OptionTitlebarSelect' with:
> >
> > proc ::OptionTitlebarSelect {item} {
> > set obviousChoice [file join [file dirname [win::Current]] $item]
> > if {[file exists $obviousChoice]} {
> > # This is whether it is a file or directory.
> > file::showInFinder $obviousChoice
> > } else {
> > file::tryToOpen $item
> > }
> > }
> >
> > cheers,
> >
>
>
> Strange... is it what the user expects when option-clicking the title
> bar in tcl mode ? This fix has the effect of revealing in the Finder
> __any__ file from the list that pops up (or rather down) when you
> option-click. I think it is more useful to edit the file.
> I have the feeling that the bug is in file::tryToOpen
> Why is the code for file::tryToOpen << purposefully ignoring the current
> window >> ?
>
> Bernard
>
> _______________________________________________
> AlphaTcl-developers mailing list
> AlphaTcl-developers@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/alphatcl-developers
>
_______________________________________________
AlphaTcl-developers mailing list
AlphaTcl-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/alphatcl-developers