From: Jim I. <ji...@ap...> - 2004-05-03 22:36:47
|
There is a lot of resistance to Tk taking up command-line arguments, since these should generally be available for Tk based applications. So I don't think a command-line argument is the way to go for the Wish Shell in general. If you want to build your own shell that uses some flag that would be fine - though to avoid confusion it would be better if you chose another name for it... You can foreground a window already with the raise command. So you don't need to do anything with the SelectWindow call. But there is no equivalent raise action for the whole application from Tcl right now. Tim's suggestion is good, this would be appropriate as an extension to the wm command IMO. But to do this somebody would need to write up a TIP and work out what's reasonable on Windows & X11 as well. Jim On May 3, 2004, at 2:09 PM, Michael McFarlane wrote: > Yes, this is really the right way to do it if you're willing to > recompile > the "Wish Shell" application. It would be nice if you could launch > the Wish > Shell with an option that would do this for you. Then you could add > the > option to the /usr/bin/wish script or build an alternate script to do > this > accordingly. > >> From: Tim Jones <tj...@to...> >> Date: Mon, 3 May 2004 12:40:20 -0700 >> To: Jerry LeVan <jer...@ek...> >> Cc: 'Tcl Mac List' <tc...@li...> >> Subject: Re: [MACTCL] Making Wish window frontmost... >> >> There is a CarbonLib function - SelectWindow - which you pass a >> pointer >> to the window you want selected. This has the affect of bringing that >> window to the front. >> >> You also have access to GetCurrentProcess (which returns the current >> PSN) and SetFrontProcess (which you pass that returned PSN). >> >> I believe that these may provide what you are looking for if they >> could >> be added to the tk wm calls. Sorry that I don't currently have >> bandwidth to dig into it further. >> >> Tim >> -- >> Tim Jones tj...@to... >> >> >> On May 3, 2004, at 12:20 PM, Jerry LeVan wrote: >> >>> A dunno, isn't the AppleScript Language guide from the mid >>> ninties still the current documentation :), they don't seem >>> to change AppleScript very much or very rapidly... >>> >>> Seems like there has to be some system call that tk core could make >>> to bring "." to the front.... >>> >>> Jerry >>> >>> On May 3, 2004, at 10:58 AM, Michael McFarlane wrote: >>> >>>> Great fix Jerry! Unfortunately, it only works well if you have one >>>> Wish >>>> Shell open at a time. Opening a second Wish Shell with this same >>>> logic >>>> fails to pop the new window on top of the old window. Still, it's >>>> an >>>> improvement. Another concern is that the "process" class within the >>>> Finder >>>> is listed as part of the "Legacy suite", which typically means that >>>> it won't >>>> be supported for long. >>>> >>>>> From: Jerry LeVan <jer...@ek...> >>>>> Date: Sun, 2 May 2004 19:09:12 -0400 >>>>> To: tc...@li... >>>>> Subject: [MACTCL] Making Wish window frontmost... >>>>> >>>>> The following seems to make the wish application window the front >>>>> most >>>>> window (if you startup from a terminal...) Probably needs to go >>>>> after >>>>> your pack/grid whatever... >>>>> >>>>> catch { >>>>> exec osascript -e "tell app \"Finder\"" \ >>>>> -e " set frontmost of process \"Wish Shell\" to >>>>> true"\ >>>>> -e "end" >>>>> >>>>> } >>>>> >>>>> Jerry >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: Oracle 10g >>>>> Get certified on the hottest thing ever to hit the market... Oracle >>>>> 10g. >>>>> Take an Oracle 10g class now, and we'll give you the exam FREE. >>>>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >>>>> _______________________________________________ >>>>> Tcl-mac mailing list >>>>> Tc...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/tcl-mac >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: Oracle 10g >>>> Get certified on the hottest thing ever to hit the market... Oracle >>>> 10g. >>>> Take an Oracle 10g class now, and we'll give you the exam FREE. >>>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >>>> _______________________________________________ >>>> Tcl-mac mailing list >>>> Tc...@li... >>>> https://lists.sourceforge.net/lists/listinfo/tcl-mac >>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: Oracle 10g >>> Get certified on the hottest thing ever to hit the market... Oracle >>> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. >>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >>> _______________________________________________ >>> Tcl-mac mailing list >>> Tc...@li... >>> https://lists.sourceforge.net/lists/listinfo/tcl-mac >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: Oracle 10g >> Get certified on the hottest thing ever to hit the market... Oracle >> 10g. >> Take an Oracle 10g class now, and we'll give you the exam FREE. >> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >> _______________________________________________ >> Tcl-mac mailing list >> Tc...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-mac >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Jim Ingham ji...@ap... Developer Tools - gdb |