/[webpac]/openisis/current/tcl/mlcm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /openisis/current/tcl/mlcm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (show annotations)
Mon Mar 8 17:43:12 2004 UTC (18 years, 2 months ago) by dpavlin
File size: 2138 byte(s)
initial import of openisis 0.9.0 vendor drop

1 #!/opt/openisis/tcl/bin/wisish
2
3 package require Tcl 8.3
4 package require openIsis 0.8
5 # package require mlcm::menu
6 package require mlcm::meta
7 # package require mlcm::profile
8 package require mlcm::lang
9 package require mlcm::db
10 package require mlcm::gui
11
12 set cfglst [mlcm::meta::defaults]
13 foreach cfg $cfglst {
14 mlcm::meta::addconfig $cfg
15 }
16 mlcm::menu::doneentries
17 set actprof [mlcm::profile::activate {}]
18 mlcm::lang::init
19 mlcm::lang::load [$actprof lang] ""
20 mlcm::lang::activate [$actprof lang]
21
22 set lang [mlcm::lang::msg "lang" ]
23
24 set stb0 [openIsis syspath /opt/openisis/db]
25
26 proc open_file {fname} {
27 global stb0 actprof
28 global db0 ;# MMM
29 puts "open_file: $fname"
30 set idx [string last / $fname]
31 $stb0 .req delete
32 if {0 < $idx} {
33 set dbpath [string range $fname 0 [expr $idx - 1]]
34 $stb0 .req .config add dbpath $dbpath
35 set fname [string range $fname [expr $idx + 1] end]
36 }
37 set idx [string last . $fname]
38 if {0 < $idx} {
39 set dbn [string range $fname 0 [expr $idx - 1]]
40 } {
41 set dbn $fname
42 }
43 $stb0 req type open db $dbn
44 set dbn [$stb0 .res get db]
45 set db0 [mlcm::db::new $dbn $stb0]
46 set gui [mlcm::gui::new . $actprof $db0]
47 mlcm::gui::activate $gui
48 mlcm::gui::all $gui
49 }
50
51 proc open_db {} {
52 global stb0
53 set dialog [tix filedialog tixFileSelectDialog]
54 $dialog config -command "open_file"
55 set fsbox [$dialog subwidget fsbox]
56 $fsbox configure -directory [$stb0 get syspath] -pattern *.mst
57 $dialog popup
58 }
59
60 open_file /opt/openisis/db/cds/cds.mst
61
62 if 0 {
63
64 set xxx [openIsisRec -fdt $mlcm::meta::fdtDb]
65 set ggg [openIsisRec]
66 $ggg add 111 eins 222 zwei
67 $xxx add 4000 myname
68 $xxx wrap -tag 4003 -done $ggg
69 $xxx add 4013 4646
70
71 set yyy [openIsis::util::deepcopy $xxx {} $mlcm::meta::fdtProf {4003 1011 4013 2023}]
72 puts "MMM >>> [$yyy get -tags]"
73 puts "MMM >>> [$yyy .1011 get -tags]"
74
75 set yyy [openIsis::util::deepcopy $xxx {} $mlcm::meta::fdtDb]
76 set yyy [openIsis::util::deepcopy $xxx $yyy]
77 puts "MMM >>> [$yyy get -tags]"
78 puts "MMM >>> [$yyy .4003 get -tags]"
79
80 puts "MMM [$actprof get -tags]"
81 set guirec [$actprof .1011]
82 puts "MMM [$guirec get -tags]"
83 $guirec done
84
85 puts "MMM list -> [mlcm::gui::tsp list $db0]"
86
87 }
88

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26