Changeset 2152 for trunk


Ignore:
Timestamp:
Mar 26, 2011, 7:39:07 PM (13 years ago)
Author:
mmc
Message:

Added a new "language" attribute type used for the builder. Fixed some
problems in the image type. Updated the number to include an image
attribute for its icon.

Location:
trunk/lang/tcl/scripts
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lang/tcl/scripts/Makefile.in

    r2145 r2152  
    6363                $(srcdir)/types/file.tcl \
    6464                $(srcdir)/types/image.tcl \
     65                $(srcdir)/types/language.tcl \
    6566                $(srcdir)/types/string.tcl \
    6667                $(srcdir)/types/units.tcl
  • trunk/lang/tcl/scripts/objects.tcl

    r2145 r2152  
    217217    # does this object type have a value class?
    218218    if {[catch {$ovclass ::#auto} obj]} {
    219 puts "OOPS! can't construct: $obj"
    220219        return ""
    221220    }
     
    225224        return $obj
    226225    }
    227 puts "OOPS! $result\nin $obj = [$obj info class]\nfrom: $obj import xml $xmlobj $path\n$::errorInfo"
    228226
    229227    # can't seem to load anything -- return null
     
    938936        # scan through all matching types and try to import the value
    939937        foreach type [importTypes] {
    940 puts "checking $type = $pattern"
    941938            if {[string match $pattern $type]} {
    942939                set cmd [format {eval $this import_%s $args} $type]
    943 puts "  testing $type = ($cmd)"
    944940                if {[catch $cmd result] == 0} {
    945 puts "  success!"
    946941                    return 1
    947942                }
     
    949944            }
    950945        }
    951 puts "  failed: $errs"
    952946        return [concat 0 $errs]
    953947    }
  • trunk/lang/tcl/scripts/objects/number/number.rp

    r2138 r2152  
    2222    attr min -title "Minimum Value" -type string:validate=number -path min
    2323    attr max -title "Maximum Value" -type string:validate=number -path max
     24    attr icon -title "Icon" -type image:maxsize=20,rescale=yes -path about.icon
    2425    attr color -title "Color" -type color -path color
    2526
  • trunk/lang/tcl/scripts/types/image.tcl

    r2145 r2152  
    161161                } else {
    162162                    if {$_actual eq ""} {
    163                         set _actual [image create photo -data $bytes]
     163                        set _actual [image create photo -data $data]
    164164                    } else {
    165                         $_actual configure -data $bytes
     165                        $_actual configure -data $data
    166166                    }
    167167                }
Note: See TracChangeset for help on using the changeset viewer.