Revision: 10547
http://pure-data.svn.sourceforge.net/pure-data/?rev=10547&view=rev
Author: eighthave
Date: 2009-01-14 01:20:48 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
switched socket channel to non-blocking, and changed reading the socket channel from 'gets' to 'read'
Modified Paths:
--------------
branches/pd-devel/0.41.4/src/pd_connect.tcl
Modified: branches/pd-devel/0.41.4/src/pd_connect.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-14 00:28:54 UTC (rev 10546)
+++ branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-14 01:20:48 UTC (rev 10547)
@@ -10,7 +10,7 @@
}
proc ::pd_connect::configure_socket {sock} {
- fconfigure $sock -blocking 1 -buffering line
+ fconfigure $sock -blocking 0 -buffering line
fileevent $sock readable {::pd_connect::pd_readsocket ""}
}
@@ -49,7 +49,6 @@
# send a pd/FUDI message from Tcl to Pd. This function aims to behave like a
# [send] in Pd, except the first argument is the name to send to.
proc ::pd_connect::pdsend {message} { # 'args' is special, it gets everything
- puts "pdsend $message"
variable pd_socket
if {[catch {puts $pd_socket $message} errorname]} {
puts stderr "pdsend errorname: >>$errorname<<"
@@ -61,7 +60,7 @@
# TODO this currently drops leading whitespace, like tabs
proc ::pd_connect::pd_readsocket {cmd_from_pd} {
variable pd_socket
- append cmd_from_pd [gets $pd_socket]
+ append cmd_from_pd [read $pd_socket]
puts stderr "cmd_from_pd: $cmd_from_pd"
if {[catch {uplevel #0 $cmd_from_pd} errorname]} {
global errorInfo
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 10546
http://pure-data.svn.sourceforge.net/pure-data/?rev=10546&view=rev
Author: eighthave
Date: 2009-01-14 00:28:54 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
oops, forgot to use the pdwindow proc for the toplevel . bindings
Modified Paths:
--------------
branches/pd-devel/0.41.4/src/pd.tk
Modified: branches/pd-devel/0.41.4/src/pd.tk
===================================================================
--- branches/pd-devel/0.41.4/src/pd.tk 2009-01-13 23:45:57 UTC (rev 10545)
+++ branches/pd-devel/0.41.4/src/pd.tk 2009-01-14 00:28:54 UTC (rev 10546)
@@ -173,7 +173,7 @@
::pd_menus::create_menubar .menubar
. configure -menu .menubar -width 400 -height 250
::pd_menus::configure_pdwindow .menubar
- ::pd_bindings::window_bindings .
+ ::pd_bindings::pdwindow_bindings .
# TODO move this to its own proc for clarity
wm title . "Pd-devel"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 10545
http://pure-data.svn.sourceforge.net/pure-data/?rev=10545&view=rev
Author: eighthave
Date: 2009-01-13 23:45:57 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
- it turns out that "." needs to be in the auto-path after all
- updated comments to make sense and be current
Modified Paths:
--------------
branches/pd-devel/0.41.4/src/pd.tk
branches/pd-devel/0.41.4/src/pd_connect.tcl
Modified: branches/pd-devel/0.41.4/src/pd.tk
===================================================================
--- branches/pd-devel/0.41.4/src/pd.tk 2009-01-13 23:17:19 UTC (rev 10544)
+++ branches/pd-devel/0.41.4/src/pd.tk 2009-01-13 23:45:57 UTC (rev 10545)
@@ -13,7 +13,6 @@
package require Tcl 8.3
package require Tk
-
## replace Tk widgets with Tile/Ttk widgets (Tile/Ttk is included in Tcl/Tk 8.5)
#package require tile
#namespace import -force ttk::*
@@ -21,15 +20,16 @@
#------------------------------------------------------------------------------#
# global variables
-
# file types for Open/Save panels
set filetypes ""
-
# for testing which platform we are running on ("aqua", "win32", or "x11")
set windowingsystem ""
#------------------------------------------------------------------------------#
# packages for this project
+
+# packages are stored in the same directory as the main script and executable
+set auto_path [linsert $auto_path 0 "."]
package require pd_connect
package require pd_menus
package require pd_bindings
@@ -47,14 +47,13 @@
#------------------------------------------------------------------------------#
# coding style
#
-
-#
+# these are preliminary ideas, we'll change them as we work things out:
# - when possible use "" doublequotes to delimit messages
-# - instead of 'global myvar' use '$::myvar'
+# - use '$::myvar' instead of 'global myvar'
# - for the sake of clarity, there should not be any inline code, everything
-# should be in a procedure that is ultimately triggered from main()
+# should be in a proc that is ultimately triggered from main()
+# - if a menu_* proc creates a panel, that proc is called menu_*_panel
#
-#
## Names for Common Variables
#----------------------------
#
@@ -128,7 +127,7 @@
}
# ------------------------------------------------------------------------------
-# canvas support functions
+# support functions
##### routine to ask user if OK and, if so, send a message on to Pd ######
proc pdtk_check {message reply_to_pd default} {
Modified: branches/pd-devel/0.41.4/src/pd_connect.tcl
===================================================================
--- branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-13 23:17:19 UTC (rev 10544)
+++ branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-13 23:45:57 UTC (rev 10545)
@@ -14,7 +14,7 @@
fileevent $sock readable {::pd_connect::pd_readsocket ""}
}
-# if pd opens first, it starts pd-gui, then pd-gui connects to port 5400
+# if pd opens first, it starts pd-gui, then pd-gui connects to the port pd sent
proc ::pd_connect::to_pd {port} {
puts "::pd_connect::to_pd"
variable pd_socket
@@ -27,8 +27,8 @@
::pd_connect::configure_socket $pd_socket
}
-# if pd-gui opens first, it creates socket, and pd connects to port 5600. If
-# it can't create, then it keeps adding 1 to the port and tries again
+# if pd-gui opens first, it creates socket and requests a port. The function
+# then returns the portnumber it receives. pd then connects to that port.
proc ::pd_connect::create_socket {} {
puts "::pd_connect::create_socket"
if {[catch {set sock [socket -server ::pd_connect::from_pd -myaddr localhost 0]}]} {
@@ -58,7 +58,7 @@
}
# TODO exit if the other side drops the socket
-# TODO this currently drops whitespace, like tabs
+# TODO this currently drops leading whitespace, like tabs
proc ::pd_connect::pd_readsocket {cmd_from_pd} {
variable pd_socket
append cmd_from_pd [gets $pd_socket]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 10543
http://pure-data.svn.sourceforge.net/pure-data/?rev=10543&view=rev
Author: eighthave
Date: 2009-01-13 21:45:24 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
oops, I mistakenly removed 'externs' from the 'all' target, put it back, and cleaned that bit up a bit
Modified Paths:
--------------
branches/pd-devel/0.41.4/src/makefile.in
Modified: branches/pd-devel/0.41.4/src/makefile.in
===================================================================
--- branches/pd-devel/0.41.4/src/makefile.in 2009-01-13 21:35:57 UTC (rev 10542)
+++ branches/pd-devel/0.41.4/src/makefile.in 2009-01-13 21:45:24 UTC (rev 10543)
@@ -75,10 +75,9 @@
# ------------------ targets ------------------------------------
#
-.PHONY: pd externs all
+.PHONY: pd externs all bin
-all: pd $(BIN_DIR)/pd-watchdog $(BIN_DIR)/pdsend \
- $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
+all: bin externs
bin: pd $(BIN_DIR)/pd-watchdog $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.