Revision: 44718
http://brlcad.svn.sourceforge.net/brlcad/?rev=44718&view=rev
Author: bob1961
Date: 2011-06-01 13:03:39 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Needed to override ArcherCore::cmd because core commands added in Archer
(including Core plugins) were not getting recognized. Added code to append core
commands coming from plugins to mArcherCoreCommands.
Modified Paths:
--------------
brlcad/trunk/src/tclscripts/archer/Archer.tcl
brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-05-31 17:27:32 UTC
(rev 44717)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-01 13:03:39 UTC
(rev 44718)
@@ -110,6 +110,15 @@
} {}
destructor {}
+
+ # Dynamically load methods
+ if {$Archer::methodDecls != ""} {
+ foreach meth $::Archer::methodDecls {
+ eval $meth
+ }
+ }
+
+
public {
# Public Class Variables
common LEDGER_ENTRY_OUT_OF_SYNC_ATTR "Ledger_Entry_Out_Of_Sync"
@@ -158,6 +167,7 @@
method raytracePlus {}
# ArcherCore Override Section
+ method cmd {args}
method 3ptarb {args}
method attr {args}
method bo {args}
@@ -496,7 +506,11 @@
# CONSTRUCTOR
# ------------------------------------------------------------
::itcl::body Archer::constructor {{_viewOnly 0} {_noCopy 0} args} {
+
# Append a few more commands
+ if {$Archer::extraMgedCommands != ""} {
+ eval lappend mArcherCoreCommands $Archer::extraMgedCommands
+ }
lappend mArcherCoreCommands importFg4Sections
if {!$mViewOnly} {
@@ -983,6 +997,15 @@
}
+::itcl::body Archer::cmd {args} {
+ set mCoreCmdLevel 1
+ set ret [eval ArcherCore::cmd $args]
+ set mCoreCmdLevel 0
+
+ return $ret
+}
+
+
::itcl::body Archer::3ptarb {args} {
eval ArcherCore::gedWrapper 3ptarb 0 0 1 1 $args
}
Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2011-05-31 17:27:32 UTC
(rev 44717)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2011-06-01 13:03:39 UTC
(rev 44718)
@@ -670,6 +670,8 @@
variable mNodeDrawList
variable mAffectedNodeList ""
+ variable mCoreCmdLevel 0
+
# init functions
method initImages {}
method initTree {}
@@ -2844,8 +2846,8 @@
return
}
- set arg1 [lindex $args 1]
if {$cmd == "info"} {
+ set arg1 [lindex $args 1]
switch $arg1 {
function {
if {[llength $args] == 3} {
@@ -2872,7 +2874,7 @@
set i [lsearch -exact $mArcherCoreCommands $cmd]
if {$i != -1} {
addHistory $args
- return [eval $args]
+ return [uplevel $mCoreCmdLevel $args]
}
set i [lsearch -exact $mUnwrappedDbCommands $cmd]
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits