Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18357
Modified Files: Tag: desiredata desire.tk Log Message: some small fixes..
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.179 retrieving revision 1.1.2.600.2.180 diff -C2 -d -r1.1.2.600.2.179 -r1.1.2.600.2.180 *** desire.tk 17 Feb 2007 03:06:01 -0000 1.1.2.600.2.179 --- desire.tk 16 Apr 2007 14:24:02 -0000 1.1.2.600.2.180 *************** *** 253,256 **** --- 253,257 ---- if {[string compare $callback noserial]} { set replyset($serial) $callback + puts " callback :::: $callback" set message [concat [lrange $message 0 0] [list with_reply $serial] [lrange $message 1 end]] incr serial *************** *** 303,307 **** set subpatcherize(outgoing_inlet) {} set subpatcherize(outgoing_outlet) {} ! #-----------------------------------------------------------------------------------# # adapted from matju's MetaRuby (UndoQueue.rb) --- 304,309 ---- set subpatcherize(outgoing_inlet) {} set subpatcherize(outgoing_outlet) {} ! set subpatcherize(future_sub) "" ! set subpatcherize(edit2) "" #-----------------------------------------------------------------------------------# # adapted from matju's MetaRuby (UndoQueue.rb) *************** *** 1602,1605 **** --- 1604,1608 ---- default {error "huh? mess=$mess"} } + if {$::subpatcherize(edit2) == $self} {set ::subpatcherize(edit2) ""; $self edit} }
*************** *** 2386,2392 **** --- 2389,2397 ---- foreach char [split $@text ""] {lappend l [scan $char %c]} $@canvas selection-= [list $self] + puts " ACTION::: [$@canvas action]" switch [$@canvas action] { insert {set goto [list $@canvas new_object_insert_wire]} chain_obj {set goto [list $@canvas new_object_chain_wire]} + subpatcherize {set goto [list $@canvas new_object_subpatcherize_redraw]} default {set goto [list $@canvas new_object_callback]} } *************** *** 2441,2455 **** def Canvas havewindow= {flag} { global subpatcherize set was [winfo exists .$self] if {$flag && $was && [$self gop]} {$self redraw} if {$flag && $was} {$self raise} if {$flag && !$was} { ! if {!$subpatcherize(paste) && !$subpatcherize(edit)} { ! netsend [list .$self map 1] ! $self init_window ! } else { ! if {$subpatcherize(paste)} {set subpatherize(paste) 0} ! if {$subpatcherize(edit)} {set subpatherize(edit) 0; $self draw_wires} ! } } ;#??? --- 2446,2464 ---- def Canvas havewindow= {flag} { global subpatcherize + if {$::subpatcherize(future_sub) != ""} { + $::subpatcherize(future_sub) subpatcherize_paste + set ::subpatcherize(future_sub) "" + } set was [winfo exists .$self] if {$flag && $was && [$self gop]} {$self redraw} if {$flag && $was} {$self raise} if {$flag && !$was} { ! #if {!$subpatcherize(paste) && !$subpatcherize(edit)} { ! # netsend [list .$self map 1] ! # $self init_window ! #} else { ! # if {$subpatcherize(paste)} {set subpatherize(paste) 0} ! # if {$subpatcherize(edit)} {set subpatherize(edit) 0; $self draw_wires} ! #} } ;#??? *************** *** 3501,3505 **** }
! def Canvas new_object_subpatcherize {subpatch} {$subpatch subpatcherize_paste} def Canvas new_object_subpatcherize_inletconnect {inlet obj} { if {[regexp {^[0-9]{1,8}i} $inlet idx]} {set idx [string trimright $idx i]} --- 3510,3520 ---- }
! #def Canvas new_object_subpatcherize {subpatch} {$subpatch subpatcherize_paste} ! def Canvas new_object_subpatcherize {subpatch} { ! if {![info exists _($subpatch:_class)]} { ! puts " $subpatch don't exists yet...." ! set ::subpatcherize(future_sub) $subpatch ! } ! } def Canvas new_object_subpatcherize_inletconnect {inlet obj} { if {[regexp {^[0-9]{1,8}i} $inlet idx]} {set idx [string trimright $idx i]} *************** *** 3512,3519 **** --- 3527,3543 ---- $self connect [list $idx $port [lsearch $@children $obj] 0] } + + #hack.. + def Canvas new_object_subpatcherize_redraw {subpatch} { + $self redraw + $self action= "none" + } + + def Canvas subpatcherize {} { set ::subpatcherize(incoming) {}; set ::subpatcherize(outgoing) {} set ::subpatcherize(incoming_inlet) {}; set ::subpatcherize(incoming_outlet) {} set ::subpatcherize(outgoing_inlet) {}; set ::subpatcherize(outgoing_outlet) {} + $self action= "subpatcherize" if {![llength $@selection]} {return} set x 0; set y 0 *************** *** 3533,3536 **** --- 3557,3561 ---- netsend [list .$self "push"] netsend [list #N canvas 0 0 450 300 sub 0] [list $self new_object_subpatcherize] + #netsend [list #N canvas 0 0 450 300 sub 0] netsend [list #X restore $x $y pd sub] netsend [list .$self "pop"] *************** *** 3630,3637 **** } $self subpatcherize_makeports ! netsend [list #X pop 1] $self subpatcherize_reconnect_outside ! set ::subpatcherize(edit) 1 ! $self edit }
--- 3655,3664 ---- } $self subpatcherize_makeports ! #netsend [list #X pop 1] ! netsend [list #X pop 0] $self subpatcherize_reconnect_outside ! #set ::subpatcherize(edit) 1 ! #after 500 $self edit ! set ::subpatcherize(edit2) $self }
*************** *** 4347,4350 **** --- 4374,4378 ---- Return {$self return_key $x $y $key $iso $shift} F1 {$self deselect_all} + F2 {set @keynav 0; $@active hide} default {} }