Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12871
Modified Files: Tag: devel_0_39 desire.tk Log Message: messagebox q bug
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.251 retrieving revision 1.1.2.252 diff -C2 -d -r1.1.2.251 -r1.1.2.252 *** desire.tk 19 Jun 2006 06:22:19 -0000 1.1.2.251 --- desire.tk 19 Jun 2006 20:14:50 -0000 1.1.2.252 *************** *** 115,119 **** if {$i>=0} {set @subscribers [lreplace $@subscribers $i $i]} } ! def Observable changed {args} { foreach x $@subscribers {eval [concat [list $x notice $self] $args]} } --- 115,120 ---- if {$i>=0} {set @subscribers [lreplace $@subscribers $i $i]} } ! def* Observable changed {args} { ! puts " subscribers ::: $@subscribers" foreach x $@subscribers {eval [concat [list $x notice $self] $args]} } *************** *** 154,157 **** --- 155,159 ---- set poolset($origin) {-1} lappend @q $origin + puts " adding $origin to the q....." } post "Manager notice: queue length is now %d" [llength $@q] *************** *** 938,943 **** def* View unclick {args} {} def* View unclickedit {args} {} ! def* View motion {args} {} ! def* View motionedit {args} {} def View selected? {} {return $@selected?} def View selected?= {x} {set @selected? $x; $self changed} --- 940,945 ---- def* View unclick {args} {} def* View unclickedit {args} {} ! def View motion {args} {} ! def View motionedit {args} {} def View selected? {} {return $@selected?} def View selected?= {x} {set @selected? $x; $self changed} *************** *** 1293,1297 **** $self populate_menu put { {Object {[%W canvas] editmode= 1;pd .%W obj %X %Y} ""} ! {Message {[%W canvas] editmode= 1;pd .%W msg %X %Y} ""} {Number {[%W canvas] editmode= 1;pd .%W floatatom %X %Y} ""} {Symbol {[%W canvas] editmode= 1;pd .%W symbolatom %X %Y} ""} --- 1295,1299 ---- $self populate_menu put { {Object {[%W canvas] editmode= 1;pd .%W obj %X %Y} ""} ! {Message {[%W canvas] editmode= 1;pd .%W msg %X %Y;global canvas;set canvas(msg_isnew) 1} ""} {Number {[%W canvas] editmode= 1;pd .%W floatatom %X %Y} ""} {Symbol {[%W canvas] editmode= 1;pd .%W symbolatom %X %Y} ""} *************** *** 1446,1449 **** --- 1448,1452 ---- if {$@edit} {return} set t .$@canvas.c.${self}text + if {[info exists @isnew]} {set @isnew 0} #--------------------------------------- label completion #set propose .$@canvas.c.${self}propose *************** *** 1846,1850 **** if {$@editmode && [llength [$id bbox]]} { mset {x1 y1 x2 y2} [$id bbox] ! post %s "y=$y y1=$y1 y2=$y2" if {$y<$y1+2} { set port [$id hilite_io i $x $y] --- 1849,1853 ---- if {$@editmode && [llength [$id bbox]]} { mset {x1 y1 x2 y2} [$id bbox] ! #post %s "y=$y y1=$y1 y2=$y2" if {$y<$y1+2} { set port [$id hilite_io i $x $y] *************** *** 2110,2114 ****
def* Canvas deselect_all {} { ! foreach o $@selection {$o selected?= 0} foreach w $@selection_wire {$w selected?= 0} set @selection {} --- 2113,2117 ----
def* Canvas deselect_all {} { ! foreach o $@selection {$o selected?= 0; puts "----------- deselecte $o"} foreach w $@selection_wire {$w selected?= 0} set @selection {} *************** *** 2285,2289 **** #foreach {type id} [$self identify_target $cx $cy -1 -1 "blah "] {} mset {type id} [$self identify_target $x $y [expr $x-1] [expr $y-1] "unclick"] ! puts "type:$type id:$id class:$_($id:class)" set @obj_in_edit $id $id edit --- 2288,2292 ---- #foreach {type id} [$self identify_target $cx $cy -1 -1 "blah "] {} mset {type id} [$self identify_target $x $y [expr $x-1] [expr $y-1] "unclick"] ! puts "++++++++ type:$type id:$id class:$_($id:class)" set @obj_in_edit $id $id edit *************** *** 2684,2687 **** --- 2687,2691 ---- #set fields(canvas) {name width height geometry editable} set fields(canvas) {foo bar x y w h editable} + set fields(msg) {foo bar x1 y1} set fields(coords) {foo bar xfrom yfrom xto yto w h gop x1 y1}
*************** *** 2746,2750 **** set _($x:_class) ObjectBox } ! if {![info exists fields($class)]} {set class obj} set i 0 --- 2750,2754 ---- set _($x:_class) ObjectBox } ! # duped here because some objs needs this properties before init if {![info exists fields($class)]} {set class obj} set i 0 *************** *** 2755,2758 **** --- 2759,2764 ---- } + if {$class == "msg"} {set _($x:text) [join [lrange $d 4 end]];set _($x:class) "msg"} + $x init if {$_($canvas(current):duplicating)} { *************** *** 2800,2810 **** } ! #if {![info exists fields($class)]} {set class obj} ! #set i 0 ! #foreach f $fields($class) { ! # set _($x:$f) [lindex $d $i] ! # puts "==== setting $x:$f to [lindex $d $i] ====" ! # incr i ! #}
#hack to get the file loading working, not sure if its a good solution --- 2806,2823 ---- } ! if {![info exists fields($class)]} {set class obj} ! set i 0 ! foreach f $fields($class) { ! set _($x:$f) [lindex $d $i] ! puts "==== setting $x:$f to [lindex $d $i] ====" ! incr i ! } ! if {$class == "msg"} {set _($x:text) [join [lrange $d 4 end]]} ! if {[info exists canvas(msg_isnew)]} { ! puts "_______ spanking new message ________" ! set _($x:isnew) 1 ! unset canvas(msg_isnew) ! } !
#hack to get the file loading working, not sure if its a good solution *************** *** 2883,2888 **** if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} .$@canvas.c itemconfigure ${self}BASE -outline $frcol - super }
--- 2896,2904 ---- if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} .$@canvas.c itemconfigure ${self}BASE -outline $frcol super + #comment out the following to see what happens with the q...... + if {[info exists @isnew]} { + if {$@isnew} {$self edit;lappend _($@canvas:selection) $self;set @isnew 0} + } }
*************** *** 2893,2901 **** set t $c.${self}text set @text [$t get 1.0 1.end] ! $self erase after 1 "destroy $t" set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} pd .$@canvas text_setto !$self $l focus $c } --- 2909,2918 ---- set t $c.${self}text set @text [$t get 1.0 1.end] ! $self delete after 1 "destroy $t" set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} pd .$@canvas text_setto !$self $l + #$self draw focus $c } *************** *** 3772,3776 **** if {$cmdline(console) != 0} { frame .log ! text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set" scrollbar .log.2 -command ".log.1 yview" global tcl_version tk_version pd_myversion tcl_platform OS --- 3789,3793 ---- if {$cmdline(console) != 0} { frame .log ! text .log.1 -width 60 -height 30 -yscrollcommand ".log.2 set" scrollbar .log.2 -command ".log.1 yview" global tcl_version tk_version pd_myversion tcl_platform OS