home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
creproj.tcl
< prev
next >
Wrap
Text File
|
1997-09-04
|
1KB
|
50 lines
global phaseList
set phaseList {
{{Analysis} {Analysis}}
{{SystemDesign} {SystemDesign}}
{{ObjectDesign} {ObjectDesign}}
{{Implementation} {Implementation}}
}
proc created {obj} {
puts "[$obj text] created!"
}
proc createPhasesIn {configv} {
global phaseList
set prev [ORB::nil]
foreach phaseDescr $phaseList {
set phName [lindex $phaseDescr 0]
set phType [lindex $phaseDescr 1]
if [$prev isNil] {
set phaseV [$configv createPhaseVersion $phName $phType]
} else {
set phaseV [$configv createPhaseVersionBehind $phName $phType $prev]
}
created $phaseV
set prev [$phaseV phase]
}
}
if [catch {
if [lempty $argv] {
puts stderr "Need project name"
exit 1
}
set projName $argv
set cc [ClientContext::global]
set corp [$cc currentCorporate]
puts "Creating project $projName..."
set proj [$corp createProject $projName]
created $proj
set conf1 [$proj createConfigVersion "default"]
created $conf1
createPhasesIn $conf1
}] {
puts $errorInfo
}