home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
copydefobj.tcl
< prev
next >
Wrap
Text File
|
1997-09-09
|
3KB
|
102 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)copydefobj.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)copydefobj.tcl /main/titanic/3 9 Sep 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require "copydefdia.tcl"
# End user added include file section
require "custdefsob.tcl"
Class CopyDefObject : {CustDefsObject} {
constructor
method destructor
method infoList
method open
method writeObject
method updateView
attribute type
attribute level
attribute gdrName
attribute description
}
constructor CopyDefObject {class this name specification} {
set this [CustDefsObject::constructor $class $this $name $specification]
# Start constructor user section
$this id $this
$this conversionSet "COPYSPEC id"
set smallIcon "[$this type]_16"
set largeIcon "[$this type]_32"
set bitmapDir [path_name concat [m4_var get M4_home] bitmaps]
if { ![file exists [path_name concat $bitmapDir "$smallIcon$BITMAP_EXT"]] } {
set smallIcon folder_16
}
if { ![file exists [path_name concat $bitmapDir "$largeIcon$BITMAP_EXT"]] } {
set largeIcon folder_32
}
$this smallIcon $smallIcon
$this largeIcon $largeIcon
# End constructor user section
return $this
}
method CopyDefObject::destructor {this} {
# Start destructor user section
# End destructor user section
$this CustDefsObject::destructor
# if editor is still running notify it
if [isCommand .main] {
[[.main editorArea] typeToGdr] unset [$this type]
}
}
method CopyDefObject::infoList {this} {
return [list {File Type} [$this type] \
{Group Definition Rules} [$this gdrName] \
{Specification Level} [$this level] \
Description [$this description]]
}
method CopyDefObject::open {this} {
if { ![$this editable] } {
return
}
.main busy TRUE
set definer [[.main editorArea] copyDefiner]
if [catch { $definer load $this }] {
set definer [CopyDefDialog new .main.copyDefiner]
[.main editorArea] copyDefiner $definer
$definer load $this
}
.main busy FALSE
}
method CopyDefObject::writeObject {this fid} {
set type [$this type]
if { $type == "default" } {
set type "*"
}
puts $fid "$type\t| [$this gdrName]"
}
method CopyDefObject::updateView {this} {
$this label [$this type]
set details [$this gdrName]
lappend details [$this level]
lappend details [$this description]
$this details $details
}
# Do not delete this line -- regeneration end marker