[PD-cvs] pd/src desire.tk,1.1.2.211,1.1.2.212

chunlee chunlee at users.sourceforge.net
Wed May 24 13:19:03 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
fixes for radio and started with message box


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.211
retrieving revision 1.1.2.212
diff -C2 -d -r1.1.2.211 -r1.1.2.212
*** desire.tk	21 May 2006 16:29:21 -0000	1.1.2.211
--- desire.tk	24 May 2006 11:19:00 -0000	1.1.2.212
***************
*** 2513,2519 ****
  }
  
  def MessageBox bang {flag} {
  	global look
! 	$canvas itemconfigure ${self}BASE -fill \
  		[if {$flag} {list #ffff00} {list $look(objectbg)}]
  }
--- 2513,2533 ----
  }
  
+ def* MessageBox click {x y b f} {
+ 	global _
+ 	$self bang 1
+ 	$@canvas focus= $self
+ 	foreach wire $@wires {
+ 		pd .$_($wire:obj2) $@text
+ 	}
+ 	after 100 $self bang 0 
+ }
+ 
+ def* MessageBox unclick {x y mod} {
+ 	$@canvas focus= $@canvas
+ }
+ 
  def MessageBox bang {flag} {
  	global look
! 	.$@canvas.c itemconfigure ${self}BASE -fill \
  		[if {$flag} {list #ffff00} {list $look(objectbg)}]
  }
***************
*** 2694,2699 ****
  
  class_new Radio {BlueBox}
  def Radio orient {} {
! 	switch $@pdclass {
  		hradio {set orient 0} hdl {set orient 0}
  		vradio {set orient 1} vdl {set orient 1}
--- 2708,2718 ----
  
  class_new Radio {BlueBox}
+ def Radio init {} {
+ 	super
+ 	set @valid 0
+ }
+ 
  def Radio orient {} {
! 	switch $@class {
  		hradio {set orient 0} hdl {set orient 0}
  		vradio {set orient 1} vdl {set orient 1}
***************
*** 2733,2747 ****
  
  def Radio click {x y b f} {
  	mset {x1 y1} [$self xy]
  	set x [expr $x-$x1]
  	set y [expr $y-$y1]
! 	set orient [radio_orient $self]
  	set i [expr ($orient?$y:$x)/$@w]
! 	pd x$self fout $i
  }
  
  class_new Slider {BlueBox}
  def Slider orient {} {
- 	global classinfo
  	switch $@class {
  		vsl {set orient 1} default {set orient 0}
--- 2752,2770 ----
  
  def Radio click {x y b f} {
+ 	$@canvas focus= $self
  	mset {x1 y1} [$self xy]
  	set x [expr $x-$x1]
  	set y [expr $y-$y1]
! 	set orient [$self orient]
  	set i [expr ($orient?$y:$x)/$@w]
! 	pd .$self fout $i
! }
! 
! def Radio unclick {x y mod} {
! 	$@canvas focus= $@canvas
  }
  
  class_new Slider {BlueBox}
  def Slider orient {} {
  	switch $@class {
  		vsl {set orient 1} default {set orient 0}
***************
*** 2877,2880 ****
--- 2900,2906 ----
  }
  
+ def* Bang properties {} {
+ }
+ 
  def Bang bbox {} {
  	mset {x1 y1} [$self xy]





More information about the Pd-cvs mailing list