home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
newvsfiled.tcl
< prev
next >
Wrap
Text File
|
1997-11-18
|
3KB
|
83 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)newvsfiled.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)newvsfiled.tcl /main/titanic/4 18 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "newextfvdi.tcl"
# General dialog for creation of vs files.
Class NewVSFileDialog : {NewExtFVDialog} {
constructor
method destructor
method checkcreateExtFile
}
constructor NewVSFileDialog {class this name} {
set this [NewExtFVDialog::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method NewVSFileDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this NewExtFVDialog::destructor
}
# This method is redefined to check and create
# vs Files.
#
method NewVSFileDialog::checkcreateExtFile {this} {
busy {
set type [$this.DC.ExtFVtypeTL selectedSet]
set name [$this.DC.ExtFVnameSLT text]
# of type makefile, maketemplate, library/executable
# only one instance per system is allowed
set msgPartA "already exists, only one"
set msgPartB "per system is allowed."
case $type in {
{makefile executable library} {
set sysV [[ClientContext::global] currentSystem]
foreach vsFile [$sysV vsFiles] {
if {[$vsFile type] == $type} {
wmtkinfo [cap "$type $msgPartA $type $msgPartB"]
return ""
}
}
if {$type == "executable" || $type == "library"} {
set tmpType executable
if {$type == "executable"} {
set tmpType library
}
foreach vsFile [$sysV vsFiles] {
if {[$vsFile type] == $tmpType} {
wmtkinfo [cap "$tmpType $msgPartA executable/library $msgPartB"]
return ""
}
}
}
if {$type == "makefile" || $type == "maketemplate"} {
return [$this createVSFile $type $type]
}
}
}
}
return [$this createVSFile $name $type]
}
# Do not delete this line -- regeneration end marker