Revision: 44824
          http://brlcad.svn.sourceforge.net/brlcad/?rev=44824&view=rev
Author:   bhinesley
Date:     2011-06-08 18:45:15 +0000 (Wed, 08 Jun 2011)

Log Message:
-----------
Fixed ManBrowser mouse binding. The dialog itself is back to business as usual. 
Now, to fix internal ToC selection (ex: set archerMan [ManBrowser .archerMan]; 
archerMan configure -selection )...

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/man_browser.tcl

Modified: brlcad/trunk/src/tclscripts/man_browser.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/man_browser.tcl 2011-06-08 13:40:23 UTC (rev 
44823)
+++ brlcad/trunk/src/tclscripts/man_browser.tcl 2011-06-08 18:45:15 UTC (rev 
44824)
@@ -48,7 +48,8 @@
 
        method get              {option}        
         method setCmdNames     {}
-       proc loadPage           {pageName w} ;# For binding & internal use
+       #proc loadPage          {pageName w} ;# For binding & internal use
+       method loadPage         {pageName}
     }
  
     private {
@@ -74,7 +75,7 @@
 
 ::itcl::body ManBrowser::get {option} {
     switch -- $option {
-       path {if {[info exists path]} {return $path}}
+       #path {if {[info exists path]} {return $path}}
     }
     error "bad option \"$option\""
 }
@@ -102,25 +103,27 @@
     #puts [$this cget -path]
     
     #ManBrowser::loadPage $selection $this
-
+    
+#return status
 }
 
-proc ManBrowser::loadPage {pageName w} {
+#proc ManBrowser::loadPage {pageName w} {
+::itcl::body ManBrowser::loadPage {pageName} {
     # Get page
-    set path [file join [$w get path] $pageName.html]
-    set htmlFile [open $path]
+    #set pathname [file join [$w get path] $pageName.html]
+    set pathname [file join $path $pageName.html]
+    set htmlFile [open $pathname]
     set pageData [read $htmlFile]
     close $htmlFile
 
     # Display page
-    set htmlview [[$w childsite].browser.htmlview html]
+    set htmlview [[$this childsite].browser.htmlview html]
     $htmlview reset
     $htmlview configure -parsemode html
     $htmlview parse $pageData
 }
 
 ::itcl::body ManBrowser::constructor {args} {
-
     # Set default path if user didn't pass one
     set path [file join [bu_brlcad_data "html"] mann en]
     #if {![info exists path]} {configure -path {}}
@@ -190,13 +193,14 @@
 
     # Load Introduction.html if it's there, otherwise load first command
     if {[file exists [file join $path Introduction.html]]} {
-        loadPage Introduction $this
+        loadPage Introduction ;# $this
     } else {
         #loadPage [lindex $commands 0] $this
     }
 
     bind $toc.toc_listbox <<ListboxSelect>> {
-       ManBrowser::loadPage [%W get [%W curselection]] %W
+       set mb [itcl_info objects -class ManBrowser]
+       $mb loadPage [%W get [%W curselection]]
     }
 
     #center [namespace tail $this]


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to