tlsgui

Check-in [2299035b1c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:start fixing [6941738bea].

We now properly identify and report invalid ORBInitRef arguments.

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2299035b1c6765280dd39c17ba1b29ce09246e32
User & Date: tgg 2012-04-07 20:04:22
Context
2012-04-07
22:38
complete [6941738bea]

We now have a working -ORBInitRef *and* a working Open... menu

So now it's possible to:

  • invoke tlsgui with -ORBInitRef argument, and that argument can be either a log factory (in which case no log is selected) or a log (in which case the log is automatically selected)
  • run it without argument, and see the CORBA Open... window to select either a log factory or a log (same rule applies)
check-in: cbb11901e5 user: tgg tags: trunk
20:04
start fixing [6941738bea].

We now properly identify and report invalid ORBInitRef arguments. check-in: 2299035b1c user: tgg tags: trunk

20:03
Rework TODO file. check-in: dbec21b8cd user: tgg tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tlsgui.

77
78
79
80
81
82
83

84
85










86
87
88






89
90

91
92
93
94
95
96
97
98
99
...
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
    # Load our stubs
    set wd [file dirname [info script]]
    source [file join $wd TimeBase.tcl]
    source [file join $wd DsLogAdmin.tcl]
}

proc lookup {name type {silent true}} {

    if {[catch {set object [corba::resolve_initial_references $name]} oops]} {
        # We're silent here in case no initial reference was specified.










        set object ""

    } else {






        if {[catch {set ok [$object _is_a $type]} oops] || !$ok} {
            if {!$silent} {

                error_box "Invalid initial reference!" "$name: $oops"
            }
            set object ""
        }
    }

    return $object
}

................................................................................
bind . <Control-q> {exit}
bind . <Control-o> {open_log}

. configure -menu .m

# Now popup Open... dialog box if needed...
if {[set ::log_mgr [lookup LogMgr $LOGMGR]] eq ""} {
    if {[set ::log [lookup Log $LOG false]] eq ""} {
        wm withdraw .
        update
        open_log true
        wm deiconify .
        update
    }
}

wm minsize . [winfo width .] [winfo height .]







>
|
<
>
>
>
>
>
>
>
>
>
>


<
>
>
>
>
>
>

<
>
|
<







 







|









77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104

105
106

107
108
109
110
111
112
113
...
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
    # Load our stubs
    set wd [file dirname [info script]]
    source [file join $wd TimeBase.tcl]
    source [file join $wd DsLogAdmin.tcl]
}

proc lookup {name type {silent true}} {
    corba::try {
        set object [corba::resolve_initial_references $name]


    } catch {IDL:omg.org/CORBA/ORB/InvalidName:1.0 ex} {
        if {[lindex [lindex $ex 1] 0] != "no_such_initial_reference"} {
            error_box "Invalid \"$name\" initial reference!" "$ex"

        } elseif {!$silent} {
            error_box "Missing \"$name\" initial reference!" \
                      "Use -ORBInitRef $name=... to specify it"
        }

        set object ""


    } catch {... oops} {
        error_box "Invalid \"$name\" initial reference!" "$oops"
        set object ""
    }

    if {$object != ""} {
        if {[catch {set ok [$object _is_a $type]} oops] || !$ok} {

            error_box "Invalid \"$name\" initial reference!" \
                      "Specified initial reference is not a $type"

            set object ""
        }
    }

    return $object
}

................................................................................
bind . <Control-q> {exit}
bind . <Control-o> {open_log}

. configure -menu .m

# Now popup Open... dialog box if needed...
if {[set ::log_mgr [lookup LogMgr $LOGMGR]] eq ""} {
    if {[set ::log [lookup Log $LOG]] eq ""} {
        wm withdraw .
        update
        open_log true
        wm deiconify .
        update
    }
}

wm minsize . [winfo width .] [winfo height .]