home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)extldbobj.tcl /main/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)extldbobj.tcl /main/2 9 Jul 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "browsdbobj.tcl"
-
- Class ExtLDbObj : {BrowsDbObj ExternalLink} {
- method destructor
- constructor
- method browserType
- method changeLocation
- method editFile
- method hasChildren
- method showFile
- }
-
- method ExtLDbObj::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this BrowsDbObj::destructor
- }
-
- constructor ExtLDbObj {class this name} {
- set this [ExternalLink::constructor $class $this $name]
- set this [BrowsDbObj::constructor $class $this $name]
- return $this
- }
-
- selfPromoter ExternalLink {this} {
- ExtLDbObj promote $this
- }
-
- proc ExtLDbObj::associations {} {
- return {accessRuleSet}
- }
-
- method ExtLDbObj::browserType {this} {
- return "[$this type]"
- }
-
- method ExtLDbObj::changeLocation {this} {
- ClassMaker::extend FileChooser ChangeLocationFileChooser dbObj
- ChangeLocationFileChooser new $wmttoolObj.changeLocation \
- -title "Change Location" \
- -selectionPolicy BROWSE \
- -filter "*" \
- -directory "[path_name directory [$this path]]" \
- -selectedSet "[list [$this path]]" \
- -dbObj $this \
- -cancelPressed {%this delete} \
- -okPressed {
- set script \
- "[%this dbObj] path [list [lindex [%this selectedSet] 0]]"
- $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
- %this delete
- }
- $wmttoolObj.changeLocation delHelpButton
- $wmttoolObj.changeLocation popUp
- }
-
- proc ExtLDbObj::childTypes {assoc} {
- if {[lsearch -exact "[ExtLDbObj::associations]" "$assoc"] == -1} {
- return ""
- }
- return "[BrowserProcs::childTypes $assoc]"
- }
-
- proc ExtLDbObj::controlledLists {} {
- return ""
- }
-
- method ExtLDbObj::editFile {this} {
- if {! [file writable [$this path]]} {
- $this showFile
- return
- }
- set file [$this path]
- $this edit
- $wmttoolObj startM4Command editor "$file" "$this quit" "$file"
- if {! [file exists $file]} {
- wmtkwarning "File '$file' does not exist"
- }
- }
-
- method ExtLDbObj::hasChildren {this} {
- return 1
- }
-
- proc ExtLDbObj::infoProperties {} {
- return [concat \
- [BrowserProcs::infoProperties] \
- {"Controlled Actions"} \
- ]
- }
-
- method ExtLDbObj::showFile {this} {
- set file [$this path]
- if {! [file exists $file]} {
- wmtkerror "File '$file' does not exist"
- return
- }
- $wmttoolObj startM4Command viewer "$file" "" "$file"
- }
-
- # Do not delete this line -- regeneration end marker
-
-