[PD-cvs] pd/src desire.tk,1.1.2.528,1.1.2.529

chunlee chunlee at users.sourceforge.net
Wed Oct 25 17:56:51 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2447

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
abstractions (non-gop) should at least load now...


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.528
retrieving revision 1.1.2.529
diff -C2 -d -r1.1.2.528 -r1.1.2.529
*** desire.tk	25 Oct 2006 12:07:38 -0000	1.1.2.528
--- desire.tk	25 Oct 2006 15:56:48 -0000	1.1.2.529
***************
*** 1048,1053 ****
  def View item_delete {{suffix all}} {
  	set c [$@canvas widget]
  	if {![winfo exists $c]} {
! 		set c [[$@canvas get_canvas] widget]
  		if {![winfo exists $c]} {return}
  	}
--- 1048,1056 ----
  def View item_delete {{suffix all}} {
  	set c [$@canvas widget]
+ 
  	if {![winfo exists $c]} {
! 		set canvas [$@canvas get_canvas]
! 		if {$canvas == "none"} {return}
! 		set c [[$canvas get_canvas] widget]
  		if {![winfo exists $c]} {return}
  	}
***************
*** 1105,1108 ****
--- 1108,1112 ----
  # this returns the canvas actually exists/drawn
  def View get_canvas {} {
+ 	if {[info exists @subpatch]} {if {$@subpatch} {return [$self canvas]}}
  	if {[winfo exists .$self.c]} {return $self}
  	if {[winfo exists .$@canvas.c]} {
***************
*** 1113,1117 ****
  			return $next_canvas
  		} else {
! 			puts "bug:: no canvas found..."
  		}
  	}
--- 1117,1122 ----
  			return $next_canvas
  		} else {
! 			#puts "bug:: no canvas found..."
! 			return none
  		}
  	}
***************
*** 1162,1166 ****
  		} else {
  			if {[$self class] == "Array"} {$self draw; return}
! 			puts "skipping $self, don't draw it...."
  			$self delete
  		}
--- 1167,1171 ----
  		} else {
  			if {[$self class] == "Array"} {$self draw; return}
! #			puts "skipping $self, don't draw it...."
  			$self delete
  		}
***************
*** 1329,1332 ****
--- 1334,1338 ----
      set @mapped 0
      set @gop 0
+     set @abs 0
      set @name ""
      set @folder "???"
***************
*** 1402,1405 ****
--- 1408,1419 ----
  	  set @y1 [lindex $mess 3]
  	  $self text= [lrange $mess 4 end]
+ 		if {$@mapped && !$@gop} {
+ 			if {!$@subpatch && !$@gop && $@text != ""} {
+ 				puts "                   I THINK I AM A ABSTRACTION $self"
+ 				set @abs 1
+ 				return
+ 			}
+ 		  if {![winfo exists .$self.c]} {$self init_window}
+ 		}
  	}
  	coords {
***************
*** 1424,1430 ****
            }
  	  if {$@gop} {set @mapped 1}
! 	  if {$@mapped && !$@gop} {
! 		  if {![winfo exists .$self.c]} {$self init_window}
! 	  }
  	}
        }
--- 1438,1445 ----
            }
  	  if {$@gop} {set @mapped 1}
! 	  #if {$@mapped && !$@gop} {
! 	#	  puts "             makeing window for $self"
! 	#	  if {![winfo exists .$self.c]} {$self init_window}
! 	#  }
  	}
        }
***************
*** 1455,1459 ****
  	# 0 -1 1 1 90 95 10 20
  	set rect [list $@xmargin $@ymargin [expr $@xmargin+$@pixwidth] [expr $@ymargin+$@pixheight]]
! 	$self item GOPRECT rectangle $rect -outline [$self look fg]
  
  }
--- 1470,1475 ----
  	# 0 -1 1 1 90 95 10 20
  	set rect [list $@xmargin $@ymargin [expr $@xmargin+$@pixwidth] [expr $@ymargin+$@pixheight]]
! 	set @goprect [GopRect new $self $rect]
! 	$@goprect draw
  
  }
***************
*** 1796,1801 ****
  
  def Canvas draw {} {
! 	if {$@subpatch && $@canvas != "" && !$@gop} {if {![winfo exists [$self widget]]} {super}} ;# is for the [pd] box if applicable
  	if {$@gop && ![winfo exists [$self widget]]} {super; return}
  	if {!$@mapped} {return}
  	if {$@editmode} {set bg [$self look bgedit]} else {set bg [$self look bgrun]}
--- 1812,1819 ----
  
  def Canvas draw {} {
! 	#if {$@subpatch && $@canvas != "" && !$@gop} {if {![winfo exists [$self widget]]} {super}} ;# is for the [pd] box if applicable
! 	if {$@subpatch && $@canvas != "" && !$@gop} {super} ;# is for the [pd] box if applicable
  	if {$@gop && ![winfo exists [$self widget]]} {super; return}
+ 	if {$@abs} {super; return}
  	if {!$@mapped} {return}
  	if {$@editmode} {set bg [$self look bgedit]} else {set bg [$self look bgrun]}
***************
*** 1810,1819 ****
  }
  
- def Canvas draw_gop {} {
- 	if {[llength $@children] == 1 && \
- 	    [[lindex $@children 0] class] == "Array"} {[lindex $@children 0] draw}
- 	#[[$self get_canvas] widget] raise $self
- }
- 
  def Canvas popup_properties {} {CanvasPropertiesDialog new $self}
  
--- 1828,1831 ----
***************
*** 2832,2835 ****
--- 2844,2859 ----
  }
  
+ 
+ class_new GopRect {View}
+ 
+ def GopRect init {canvas rect} {
+ 	set @canvas $canvas
+ 	set @rect $rect
+ }
+ 
+ def GopRect draw {} {
+ 	$self item GOPRECT rectangle $@rect -outline [$self look fg]
+ }
+ 
  class_new SelRect {View}
  def SelRect init {canvas x y bf target} {





More information about the Pd-cvs mailing list