home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1995
- #
- # File: @(#)ude.tcl /main/hindenburg/2
- # Author: Fred Mol
- # Description: main ude.tcl
- #---------------------------------------------------------------------------
- # SccsId = @(#)ude.tcl /main/hindenburg/2 23 Aug 1996Copyright 1995 Westmount Technology
-
- OtkRegister::extGui
-
- source [m4_path_name tcl libocl.tcl]
-
- require platform.tcl
- require procs.tcl
- require messagehdl.tcl
-
- proc usage {} {
- error "Usage: otk ude.tcl -- \
- \[-c caller\] \
- \[-r\] \
- fileVersionId systemVersionId configVersionId"
- }
-
- set argc 0
- set status INITIAL
- set readOnly 0
- set caller ""
- foreach arg $argv {
- case $arg in {
- {-c} {
- if {$status != "INITIAL"} {
- usage
- }
- set status CALLER
- }
- {-r} {
- if {$status != "INITIAL"} {
- usage
- }
- set readOnly 1
- }
- {default} {
- case $status in {
- {CALLER} {
- set caller $arg
- set status INITIAL
- }
- {INITIAL} {
- if [catch {set fv [Graph new $arg]}] {
- usage
- }
- set status GRAPH
- }
- {GRAPH} {
- if [catch {set sv [SystemVersion new $arg]}] {
- usage
- }
- set status SYSV
- }
- {SYSV} {
- if [catch {set cv [ConfigVersion new $arg]}] {
- usage
- }
- set status CONFV
- }
- {default} {
- usage
- }
- }
- }
- }
- incr argc 1
- }
- if {$status != "CONFV"} {
- usage
- }
-
- set type [[$fv file] type]
- require "${type}editor.tcl"
-
- sourceOptional u_ude
-
- [string toupper $type]Editor new .main \
- -systemVersion $sv \
- -configVersion $cv \
- -permanentReadOnly $readOnly \
- -caller "$caller" \
- -firstExposed ".main startEdit $fv"
-
- .main popUp
- .main ready
-