Try replacing the following procedure in misc.tcl. This will
work both with the toolbar font buttons and the font manager.
##########################################################
proc vTcl:clean_pairs {list {indent 8}} {
global vTcl
set tab [string range " " 0 [expr $indent - 1]]
set index $indent
set output $tab
set last ""
foreach i $list {
if {$last == ""} {
set last $i
} else {
set noencase 0
if {[info exists vTcl(option,noencase,$last)]} {
if [string match *font* $last] {
if [string match {\[*\]} $i] {
set noencase 1
}
} else {
set noencase 1
}
}
if {$noencase} {
set i "$last $i "
} else {
switch $vTcl(pr,encase) {
list {
set i "$last [list $i] "
}
brace {
set i "$last \{$i\} "
}
quote {
set i "$last \"$i\" "
}
}
}
set last ""
set len [string length $i]
if { [expr $index + $len] > 78 } {
append output "\\\n${tab}${i}"
set index [expr $indent + $len]
} else {
append output "$i"
incr index $len
}
}
}
return $output
}
Eric Taylor wrote:
>
> At 06:36 PM 05/22/00 -0700, you wrote:
> >Going from 1.2.0 to 1.2.1 I see a problem with
> >fonts. If I set a font to {courier 8} with or
> >without the {}'s, when I save, the {}'s are not
> >output. Thus on reloading, there is a failure, in
> >this case saying something about a bad option 8 since
> >the code output does not put back the {}'s.
> >
> >eric
>
> The problem is in
> libs/dump.tcl
> proc vTcl:get_opts_special
>
> The line
>
> lappend ret $o $v
>
> loses the fact that $v can be a 2 element string.
>
> As a workaround for my own use, i wrote this:
>
> if {$o == "-font"} {
> lappend ret $o \{$v\}
> } else {
> lappend ret $o $v
> }
>
> to re-apply the {}'s for the -font attribute
>
> eric
>
> _______________________________________________
> vtcl-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/vtcl-user
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user