[PD-cvs] pd/src objective.tcl, 1.1.2.2, 1.1.2.3 desire.tk, 1.1.2.88, 1.1.2.89
Mathieu Bouchard
matju at users.sourceforge.net
Mon Oct 31 13:47:14 CET 2005
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4509
Modified Files:
Tag: devel_0_39
objective.tcl desire.tk
Log Message:
fixed bugs in client-side observer and manager and such
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.88
retrieving revision 1.1.2.89
diff -C2 -d -r1.1.2.88 -r1.1.2.89
*** desire.tk 31 Oct 2005 11:13:58 -0000 1.1.2.88
--- desire.tk 31 Oct 2005 12:47:12 -0000 1.1.2.89
***************
*** 51,60 ****
def* observable subscribe {observer} {
set i [lsearch $@subscribers $observer]
! if {!$i} {lappend @subscribers $observer}
}
def* observable unsubscribe {observer} {
set i [lsearch $@subscribers $observer]
! if {$i} {set @subscribers [lreplace $@subscribers $i $i]}
}
--- 51,60 ----
def* observable subscribe {observer} {
set i [lsearch $@subscribers $observer]
! if {$i<0} {lappend @subscribers $observer}
}
def* observable unsubscribe {observer} {
set i [lsearch $@subscribers $observer]
! if {$i>=0} {set @subscribers [lreplace $@subscribers $i $i]}
}
***************
*** 73,77 ****
class_new manager {thing}
! def manager init {} {
set @q [list]
$self call
--- 73,78 ----
class_new manager {thing}
! def* manager init {} {
! post %s "MANAGER INIT!!! self=$self"
set @q [list]
$self call
***************
*** 90,94 ****
}
! def manager notice {origin args} {
global poolset
if {[info exists poolset($origin)]} {
--- 91,95 ----
}
! def* manager notice {origin args} {
global poolset
if {[info exists poolset($origin)]} {
***************
*** 683,692 ****
#-----------------------------------------------------------------------------------#
- proc* pdtk_canvas_new {name width height geometry editable} {
- global _
- set self [c2self $name]
- canvas_new_as $self $width $height $geometry $editable
- }
-
class_new canvas {view}
def* canvas init {{width 300} {height 400} {geometry 400x300+0+0} {editable 0}} {
--- 684,687 ----
***************
*** 732,735 ****
--- 727,734 ----
set @children {}
set @obj_in_edit {}
+ global manager
+ post %s "canvas init: subscribing to $manager"
+ $self subscribe $manager
+ $self changed
}
***************
*** 1086,1094 ****
#-----------------------------------------------------------------------------------
- #proc objectbox_by_ctrl {} {
- #
- # pd "%W obj 0 ;"
- #
- #}
class_new objectbox {textbox}
--- 1085,1088 ----
***************
*** 1220,1227 ****
# think of the children!!!
set born [lwithout $children $@children]; post %s "BORN: $born"
! set dead [lwithout $@children $children]; post %s "BORN: $dead"
! foreach x $born {}
! foreach x $dead {}
set @children $children
}
--- 1214,1222 ----
# think of the children!!!
set born [lwithout $children $@children]; post %s "BORN: $born"
! set dead [lwithout $@children $children]; post %s "DEAD: $dead"
! foreach x $born {$x subscribe $self; $x changed}
! foreach x $dead {$x unsubscribe $self}
set @children $children
+ $self changed
}
***************
*** 1684,1695 ****
}
! def canvas notice {origin args} {
! global pool
! set has_window 1
! if {$has_window} {
! set pool($origin) 1
! } {
! eval [concat [list child_changed $origin] $args]
! }
}
--- 1679,1684 ----
}
! def* canvas notice {origin args} {
! eval [concat [list child_changed $origin] $args]
}
***************
*** 1875,1879 ****
set fields(hdl) $fields(hradio)
set fields(vdl) $fields(hradio)
! #set fields(msg)
# @class {@_class}
--- 1864,1869 ----
set fields(hdl) $fields(hradio)
set fields(vdl) $fields(hradio)
! set fields(canvas) {name width height geometry editable}
!
# @class {@_class}
***************
*** 3027,3029 ****
--- 3017,3021 ----
+ post %s hello
set manager [manager_new]
+ post %s hello
Index: objective.tcl
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/objective.tcl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** objective.tcl 31 Oct 2005 11:13:58 -0000 1.1.2.2
--- objective.tcl 31 Oct 2005 12:47:11 -0000 1.1.2.3
***************
*** 26,29 ****
--- 26,30 ----
set _(\$self:_class) $self
eval [concat [list \$self init] \$args]
+ return \$self
"
proc ${self}_new_as {self args} "
***************
*** 31,34 ****
--- 32,36 ----
set _(\$self:_class) $self
eval [concat [list \$self init] \$args]
+ return \$self
"
}
More information about the Pd-cvs
mailing list