browser.tcl File Reference

Go to the source code of this file.

Functions/Subroutines

exec wish package require dom
package require domtree
package require domtext ret 
Open ()

Function Documentation

exec wish package require dom package require domtree package require domtext ret Open (  ) 

Definition at line 21 of file browser.tcl.

00021              {
00022     global tree text doc view
00023 
00024     set fname [tk_getOpenFile]
00025     if {![string length $fname]} {
00026         return {}
00027     }
00028 
00029     set ch [open $fname]
00030     set newdoc [dom::parse [read $ch]]
00031     close $ch
00032 
00033     $tree configure -rootnode {}
00034     $text configure -rootnode {}
00035     catch {dom::destroy $doc}
00036 
00037     set doc $newdoc
00038     if {[lsearch $view tree] >= 0} {
00039     $tree configure -rootnode $doc
00040     }
00041     if {[lsearch $view text] >= 0} {
00042     $text configure -rootnode $doc
00043     }
00044 
00045     return {}
00046 }


Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1