version 1.1, 1999/09/28 21:25:36
|
version 1.2, 1999/10/13 18:45:28
|
Line 1162 proc addDate { listbox } {
|
Line 1162 proc addDate { listbox } {
|
########################################################### |
########################################################### |
proc createDBHeader {} { |
proc createDBHeader {} { |
global gNumberParsedText gPrompt gLoadHeaderSet gControlDates \ |
global gNumberParsedText gPrompt gLoadHeaderSet gControlDates \ |
gSetNumberText gHeaderQCount |
gSetNumberText gHeaderQCount gEnableDiscussion gFile |
|
|
if { $gNumberParsedText == "" } { |
if { $gNumberParsedText == "" } { |
displayError "You must first preview the file before creating the \ |
displayError "You must first preview the file before creating the \ |
Line 1182 proc createDBHeader {} {
|
Line 1182 proc createDBHeader {} {
|
message $dialog.msg -text "Header Information" -aspect 1000 |
message $dialog.msg -text "Header Information" -aspect 1000 |
set loadFrame [frame $dialog.loadFrame -borderwidth 4 -relief sunken] |
set loadFrame [frame $dialog.loadFrame -borderwidth 4 -relief sunken] |
set infoFrame [frame $dialog.infoFrame -borderwidth 4 -relief sunken] |
set infoFrame [frame $dialog.infoFrame -borderwidth 4 -relief sunken] |
|
set optionFrame [frame $dialog.options] |
set buttonFrame [frame $dialog.buttons -bd 10] |
set buttonFrame [frame $dialog.buttons -bd 10] |
pack $dialog.msg $loadFrame $infoFrame $buttonFrame -side top -fill x |
pack $dialog.msg $loadFrame $infoFrame $optionFrame $buttonFrame -side top -fill x |
|
|
set legendFrame [frame $infoFrame.legendFrame] |
set legendFrame [frame $infoFrame.legendFrame] |
set listFrame [frame $infoFrame.listFrame] |
set listFrame [frame $infoFrame.listFrame] |
Line 1212 proc createDBHeader {} {
|
Line 1213 proc createDBHeader {} {
|
button $loadFrame.load -text "load" -command "loadDates $listbox" |
button $loadFrame.load -text "load" -command "loadDates $listbox" |
pack $loadFrame.msg $loadFrame.entry $loadFrame.load -side left |
pack $loadFrame.msg $loadFrame.entry $loadFrame.load -side left |
|
|
|
if { [file exists [file join [file dirname $gFile] discussion $gSetNumberText]] } { |
|
set gEnableDiscussion 1 |
|
} else { |
|
set gEnableDiscussion 0 |
|
} |
|
checkbutton $optionFrame.discuss -text "Enable Discussion Forum" \ |
|
-variable gEnableDiscussion |
|
pack $optionFrame.discuss |
|
|
button $buttonFrame.ok -text Set -command { set gPrompt(ok) 1 } \ |
button $buttonFrame.ok -text Set -command { set gPrompt(ok) 1 } \ |
-underline 0 |
-underline 0 |
button $buttonFrame.cancel -text Cancel -command { set gPrompt(ok) 0 } \ |
button $buttonFrame.cancel -text Cancel -command { set gPrompt(ok) 0 } \ |
Line 1241 proc createDBHeader {} {
|
Line 1251 proc createDBHeader {} {
|
capaGrab release $dialog |
capaGrab release $dialog |
destroy $dialog |
destroy $dialog |
if {$gPrompt(ok) == 1 } { |
if {$gPrompt(ok) == 1 } { |
|
updateDiscussion |
eval updateHeader [ eval concat $gControlDates ] |
eval updateHeader [ eval concat $gControlDates ] |
} |
} |
|
|
Line 1249 proc createDBHeader {} {
|
Line 1260 proc createDBHeader {} {
|
} |
} |
|
|
########################################################### |
########################################################### |
|
# updateDiscussion |
|
########################################################### |
|
########################################################### |
|
########################################################### |
|
proc updateDiscussion {} { |
|
global gFile gSetNumberText gEnableDiscussion |
|
set dir [file dirname $gFile] |
|
set disDir [file join $dir discussion $gSetNumberText] |
|
set logDir [file join $dir discussion logs] |
|
if { $gEnableDiscussion } { |
|
if { ![file exists $disDir] } { |
|
if { [file exists $disDir.unavailable] } { |
|
exec mv $disDir.unavailable $disDir |
|
} else { |
|
file mkdir $disDir |
|
file attributes $disDir -permissions 0777 |
|
} |
|
} |
|
if { ![file exists $logDir] } { |
|
file mkdir [file join $dir discussion logs] |
|
file attributes [file join $dir discussion logs] -permissions 0777 |
|
} |
|
} else { |
|
if { [file exists $disDir] } { exec mv $disDir $disDir.unavailable } |
|
} |
|
} |
|
|
|
########################################################### |
# allFieldsComplete2 |
# allFieldsComplete2 |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
proc allFieldsComplete2 {} { |
proc allFieldsComplete2 {} { |
global gLoadHeaderSet gControlDates |
global gLoadHeaderSet gControlDates |
|
|
if { [string length $gOpenDate] != 8 } { |
if { [string length $gOpenDate] != 8 } { |
return 0 |
return 0 |