home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
draginfoob.tcl
< prev
next >
Wrap
Text File
|
1997-11-21
|
4KB
|
145 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)draginfoob.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)draginfoob.tcl /main/titanic/6 21 Nov 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "infoobject.tcl"
Class DragInfoObj : {InfoObject} {
constructor
method destructor
method promoter
method contextList
method lvlPath
method linkSource
method shellLink
}
global DragInfoObj::lastShellLink
set DragInfoObj::lastShellLink ""
constructor DragInfoObj {class this name browsUiObj} {
set this [InfoObject::constructor $class $this $name $browsUiObj]
# Start constructor user section
$this promoter
# End constructor user section
return $this
}
method DragInfoObj::destructor {this} {
# Start destructor user section
global DragInfoObj::lastShellLink
if {${DragInfoObj::lastShellLink} != ""} {
unlink -nocomplain ${DragInfoObj::lastShellLink}
set DragInfoObj::lastShellLink ""
}
# End destructor user section
$this InfoObject::destructor
}
method DragInfoObj::promoter {this} {
set cvSet "BROWSUIOBJ contextList"
if [[$this browsUiObj] isA Graph] {
if {![catch {set type [nt_get_type [$this lvlPath]]}]} {
set type [string toupper $type]
append cvSet " ${type}DRAGOBJECT lvlPath"
if $win95 {
append cvSet " HDROP shellLink"
}
}
}
$this conversionSet $cvSet
}
method DragInfoObj::contextList {this} {
set context ""
set uiObj [$this browsUiObj]
set proj [$uiObj getParent Project]
if {"$proj" != ""} {
lappend context [$proj getInfo Identity]
set confV [$uiObj getParent ConfigVersion]
if {"$confV" != ""} {
lappend context [$confV getInfo Identity]
set phaseV [$uiObj getParent PhaseVersion]
if {"$phaseV" != ""} {
lappend context [$phaseV getInfo Identity]
set sysV [$uiObj getParent SystemVersion]
if {"$sysV" != ""} {
lappend context [$sysV getInfo Identity]
}
}
}
}
lappend context [$uiObj getInfo Identity]
lappend context [$uiObj browserType]
lappend context [$uiObj uiClass]
return [list $context]
}
method DragInfoObj::lvlPath {this} {
# this can go wrong in corporate groups,
# catch it
set uiObj [$this browsUiObj]
if [$uiObj isA FileVersion] {
set confV [$uiObj getParent ConfigVersion]
set phaseV [$uiObj getParent PhaseVersion]
set sysV [$uiObj getParent SystemVersion]
set file [$uiObj file]
set cc [ClientContext::global]
set fName [$file qualifiedName /].[$file type]
return [[$cc createPath $confV $phaseV $sysV] asString]/$fName
}
}
method DragInfoObj::linkSource {this} {
# !! Implement this function !!
}
method DragInfoObj::shellLink {this} {
global DragInfoObj::lastShellLink
if {${DragInfoObj::lastShellLink} != ""} {
unlink -nocomplain ${DragInfoObj::lastShellLink}
set DragInfoObj::lastShellLink ""
}
set uiObj [$this browsUiObj]
if [$uiObj isA FileVersion] {
set confV [$uiObj getParent ConfigVersion]
set phaseV [$uiObj getParent PhaseVersion]
set sysV [$uiObj getParent SystemVersion]
set file [$uiObj file]
set cc [ClientContext::global]
set fName [$file qualifiedName /].[$file type]
set lvl [[$cc createPath $confV $phaseV $sysV] asString]/$fName
if [catch {set shl [ShellLink new]} msg] {
# ignore
# probably NT 3.51
wmtkerror $msg
return
}
$shl path [m4_path_name bin otk.exe]
$shl arguments "[m4_path_name tcl ude.tcl] -- $lvl"
set guiName \
"[$file qualifiedName " "] [ShortLongName::longName [$file type]].lnk"
set f $env(TMP)\\$guiName
$shl createIt $f
set DragInfoObj::lastShellLink [list $f]
return [list $f]
}
}
# Do not delete this line -- regeneration end marker