[PD-cvs] SF.net SVN: pure-data:[10545] branches/pd-devel/0.41.4/src

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Wed Jan 14 00:45:58 CET 2009


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.




More information about the Pd-cvs mailing list