Changeset 809 for trunk/expgui


Ignore:
Timestamp:
Dec 4, 2009 5:12:25 PM (11 years ago)
Author:
toby
Message:

# on 2004/09/28 22:31:01, toby did:
use winutils or winexec
catch expgui when called with .Oxx (archived .EXP) files

to eventually offer rename choices

catch Mac Reload EXP? bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2004/09/20 15:28:29 to 2004/09/28 22:31:01
    • Property rcs:lines changed from +4 -2 to +22 -9
    • Property rcs:rev changed from 1.73 to 1.74
    r801 r809  
    5858        set expgui(expfile) [lindex $argv 0]
    5959    }
    60     if {[string toupper [file extension $expgui(expfile)]] != ".EXP"} {
     60    if {[string match -nocase {.o[0-9a-f][0-9a-f]} \
     61             [file extension $expgui(expfile)]]} {
     62        # this is an archived file -- need to handle this later
     63        tk_dialog .expFileErrorMsg "No archived files yet" \
     64            "At present you must use open (expnam) to open archived files" warning 0 "Continue"
     65        set expgui(expfile) {}
     66    } elseif {[string toupper [file extension $expgui(expfile)]] != ".EXP"} {
    6167        append expgui(expfile) ".EXP"
    6268    }
     
    177183if {$tcl_platform(platform) == "windows" \
    178184        && $tcl_platform(os) == "Windows 95"} {
    179     if [catch {package require winexec}] {
     185    if {[catch {package require winexec}] && \
     186            [catch {package require winutils}]} {
    180187        MyMessageBox -parent . -title "WINEXEC Error" \
    181                 -message "Error -- Unable to load the WINEXEC package. This is needed in Win95 machines" \
    182                 -icon error -type Quit -default quit \
    183                 -helplink "expgui_Win_readme.html Winexec"
     188            -message "Error -- Unable to load the WINEXEC or the WINUTILS package. This is needed in Win-95/-98/-me machines" \
     189            -icon error -type Quit -default quit \
     190            -helplink "expgui_Win_readme.html Winexec"
    184191        destroy .
    185192    }
     
    854861    #} else {
    855862
     863    # compute widths with a catch, since this has been showing an error
     864    # at least for one Mac user
     865    set askwid 40
     866    catch {set askwid [winfo reqwidth $w]}
     867    set askhgt 80
     868    catch {set askhgt [winfo reqheight $w]}
    856869        # for now, always center the message over the main window
    857870        # center the new window in the middle of the parent
    858871        set x [expr [winfo x .] + [winfo width .]/2 - \
    859                 [winfo reqwidth $w]/2 - [winfo vrootx .]]
     872                $askwid/2 - [winfo vrootx .]]
    860873        set y [expr [winfo y .] + [winfo height .]/2 - \
    861                 [winfo reqheight $w]/2 - [winfo vrooty .]]
     874                $askhgt/2 - [winfo vrooty .]]
    862875        wm geom $w +$x+$y
    863876    #}
Note: See TracChangeset for help on using the changeset viewer.