Hi Dewey,

I was just making some short examples for the g code section and it hit 
me that smartprobe.ngc (an example file) would be a good one to convert 
to an example for ngcgui.

John

On 12/29/2011 5:06 AM, Dewey Garrett wrote:
> ngcgui: bugfix
>
> symptom: when specifying a single "Custom" tab, an error
>           occurred because ::ngc(any,custom,color) was not set yet
> fix:     invoke initgui earlier for embedded page
>
> symptom: with option new, new tab could not find file
>           in search path because fullpath was passed
> fix:     use file tail to support search
>
>
> http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=30a2719
>
> ---
>   tcl/ngcgui.tcl |   13 +++++++++----
>   1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/tcl/ngcgui.tcl b/tcl/ngcgui.tcl
> index ebc24d5..cc113c7 100644
> --- a/tcl/ngcgui.tcl
> +++ b/tcl/ngcgui.tcl
> @@ -908,6 +908,7 @@ proc ::ngcgui::qid {} {
>
>   proc ::ngcgui::initgui {hdl} {
>     if ![info exists ::ngc(embed,hdl)] {set ::ngc(embed,hdl) 0}
> +  if [info exists ::ngcgui($hdl,afterid)] { return ;# already done }
>     # fixed initializations
>     set ::ngc(any,pentries)       10 ;# number of entries in positional frame
>                                      ;# 30 max positional parameters
> @@ -3259,22 +3260,25 @@ proc ::ngcgui::newpage {creatinghdl} {
>
>     if $::ngc(opt,noinput) {
>       # there is no wI input frame, just use current file
> -    set subfile $::ngc($creatinghdl,fname,subfile)
> +    # file tail needed to use search path
> +    set subfile [file tail $::ngc($creatinghdl,fname,subfile)]
>       if {"$subfile" == ""} {
>         set ::ngc(opt,noinput) 0 ;# need input if no subfile to open page
>       }
>     }
>     if $::ngc($creatinghdl,chooser) {
> -    set subfile "\"\""  ;# chooser
> +    set subfile "\"\""  ;# chooser starts with no specifed subfile
>     }
>
>     set prefile ""
>     set postfile ""
>     if {"$::ngc($creatinghdl,dname,preamble)" != ""} {
> -    set prefile $::ngc($creatinghdl,fname,preamble)
> +    # file tail needed to use search path
> +    set prefile [file tail $::ngc($creatinghdl,fname,preamble)]
>     }
>     if {"$::ngc($creatinghdl,dname,postamble)" != ""} {
> -    set postfile $::ngc($creatinghdl,fname,postamble)
> +    # file tail needed to use search path
> +    set postfile [file tail $::ngc($creatinghdl,fname,postamble)]
>     }
>
>     set pageid ngcgui[qid]
> @@ -3521,6 +3525,7 @@ proc ::ngcgui::embed_in_axis_tab {f args} {
>       incr ::ngc(embed,hdl)
>     }
>     set hdl $::ngc(embed,hdl) ;# local
> +  initgui $hdl
>
>     ::ngcgui::preset $hdl ::ngc   ;# setup defaults
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _____________________________________________
> Emc-commit mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-commit

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to