/[tcldrop]/tcldrop/modules/idx.tcl
ViewVC logotype

Diff of /tcldrop/modules/idx.tcl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by fireegl, Wed Jun 4 21:02:38 2003 UTC revision 1.7 by fireegl, Tue Nov 4 03:17:16 2003 UTC
# Line 50  proc ::tcldrop::idx::Assign {args} { Line 50  proc ::tcldrop::idx::Assign {args} {
50  proc ::tcldrop::idx::Register {idx info} {  proc ::tcldrop::idx::Register {idx info} {
51          variable idxlist          variable idxlist
52          set idxlist($idx) $info          set idxlist($idx) $info
         array set idxinfo $info  
53  }  }
54    
55  # Unregisters all connections matching idxmask:  # Unregisters all connections matching idxmask:
# Line 70  proc ::tcldrop::idx::Info {{idx {*}}} { Line 69  proc ::tcldrop::idx::Info {{idx {*}}} {
69  # FixMe: Should this be doing error checking/returning errors?  # FixMe: Should this be doing error checking/returning errors?
70  proc ::tcldrop::idx::GetInfo {idx infotype} {  proc ::tcldrop::idx::GetInfo {idx infotype} {
71          if {![valididx $idx]} {          if {![valididx $idx]} {
72                  error "invalid idx: $idx"                  return -code error "invalid idx: $idx"
73          } else {          } else {
74                  variable idxlist                  variable idxlist
75                  array set idxinfo $idxlist($idx)                  array set idxinfo $idxlist($idx)
76                  if {[info exists idxinfo($infotype)]} {                  if {[info exists idxinfo($infotype)]} {
77                          return $idxinfo($infotype)                          return $idxinfo($infotype)
78                  } else {                  } else {
79                          error "no such type: $infotype"                          return -code error "no such type: $infotype"
80                  }                  }
81          }          }
82  }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26