[PD-cvs] pd/src desire.tk,1.1.2.600.2.235,1.1.2.600.2.236

Mathieu Bouchard matju at users.sourceforge.net
Sat Jul 14 21:44:11 CEST 2007


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

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
cleanup; change proc mset so that it works when there are more values than variables


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.235
retrieving revision 1.1.2.600.2.236
diff -C2 -d -r1.1.2.600.2.235 -r1.1.2.600.2.236
*** desire.tk	14 Jul 2007 13:37:48 -0000	1.1.2.600.2.235
--- desire.tk	14 Jul 2007 19:44:07 -0000	1.1.2.600.2.236
***************
*** 73,77 ****
  
  # set several variables from elements of a list
! proc mset {vars list} {uplevel 1 "foreach {$vars} {$list} {}"}
  
  # add or substract two lists
--- 73,77 ----
  
  # set several variables from elements of a list
! proc mset {vars list} {uplevel 1 "foreach {$vars} {$list} {break}"}
  
  # add or substract two lists
***************
*** 2579,2583 ****
  		set @keynav_last_obj 0
  	}
! 	puts "Canvas del: [$o class]"
  	if {[$o class] != "Canvas"} {
  		$@history add [list $self ins $i [$o deconstruct]]
--- 2579,2583 ----
  		set @keynav_last_obj 0
  	}
! 	# this "if" might not be necessary... try deconstruct_to for everything.
  	if {[$o class] != "Canvas"} {
  		$@history add [list $self ins $i [$o deconstruct]]
***************
*** 6004,6008 ****
  	$self draw_name
  	mset {x_off y_off} [$@canvas xy]
! 	mset {xfrom yto xto yfrom pixwidth pixheight} [$@canvas get_mess]
  	if {[winfo exists [$@canvas widget]]} {
  		mset {c_width c_height} [$@canvas get_dimen]
--- 6004,6009 ----
  	$self draw_name
  	mset {x_off y_off} [$@canvas xy]
! 	set m [$@canvas get_mess]
! 	mset {xfrom yto xto yfrom pixwidth pixheight} $m
  	if {[winfo exists [$@canvas widget]]} {
  		mset {c_width c_height} [$@canvas get_dimen]
***************
*** 6475,6482 ****
  
  def Completion list_callback {} {
- 	global class_list look
  	$self search_for_externs
! 	set class_list [luniq [lsort $class_list]]
! 
  	toplevel .$self
  	wm protocol .$self WM_DELETE_WINDOW "$self cancel"
--- 6476,6481 ----
  
  def Completion list_callback {} {
  	$self search_for_externs
! 	set class_list [luniq [lsort $::class_list]]
  	toplevel .$self
  	wm protocol .$self WM_DELETE_WINDOW "$self cancel"
***************
*** 6488,6505 ****
  	set @rooty [winfo rooty .$@name.c]
  	set @max [wm maxsize .$self]
! 	#not sure what this if is for...
! 	if {[regexp {x([0-9a-z]{6,8})text$} $@textbox textself]} {
! 		set cut [string first "text" $textself]
! 		set textself [string range $textself 0 [expr $cut -1]]
! 		set @textself [string range $textself 0 [expr $cut -1]]
! 	}
! 	if {[$canvas look showcomp] <= 20} {
! 		set @height [$canvas look showcomp]} else {set @height 20}
! 	listbox $f -width $@width -height $@height -relief flat \
  	    -bg [$@textself look bg] -selectbackground [$@textself look fg] \
! 	    -activestyle dotbox -selectforeground [$@textself look bg] -fg [$@textself look fg] \
! 	    -font $look(View:font)
  	$self adjust_box
- 
  	bind $f <Button-1> "after 1 \"$self complete\""
  	bind $f <Return>   "after 1 \"$self complete\""
--- 6487,6496 ----
  	set @rooty [winfo rooty .$@name.c]
  	set @max [wm maxsize .$self]
! 	if {[regexp {(x[0-9a-z]{6,8})text$} $@textbox dummy textself]} {set @textself $textself}
! 	if {[$canvas look showcomp] <= 20} {set @height [$canvas look showcomp]} else {set @height 20}
! 	listbox $f -width $@width -height $@height -relief flat -activestyle dotbox -font $::look(View:font) \
  	    -bg [$@textself look bg] -selectbackground [$@textself look fg] \
! 	    -fg [$@textself look fg] -selectforeground [$@textself look bg]
  	$self adjust_box
  	bind $f <Button-1> "after 1 \"$self complete\""
  	bind $f <Return>   "after 1 \"$self complete\""





More information about the Pd-cvs mailing list