[Gridflow-cvs] [svn] commit: r3486 - /trunk/base/flow_objects.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Apr 14 14:13:21 EDT 2008


Author: matju
Date: Mon Apr 14 14:13:20 2008
New Revision: 3486

Log:
remove ruby [args]

Modified:
    trunk/base/flow_objects.rb

Modified: trunk/base/flow_objects.rb
==============================================================================
--- trunk/base/flow_objects.rb (original)
+++ trunk/base/flow_objects.rb Mon Apr 14 14:13:20 2008
@@ -93,50 +93,6 @@
 FObject.subclass("ls",1,1) {
         def _0_symbol(s) send_out 0, :list, *Dir.new(s.to_s).map {|x| x.intern } end
         def _0_glob  (s) send_out 0, :list, *Dir[    s.to_s].map {|x| x.intern } end
-}
-
-FObject.subclass("args",1,1) {
-	def initialize(*argspecs) @argspecs = argspecs end
-	def initialize2; self.noutlets = @argspecs.length+1 end
-	def _0_bang
-		pa,*loadbang=patcherargs.split(:",")
-		GridFlow.handle_braces! pa
-		#GridFlow.post "patcherargs=%s", pa.inspect
-		i=@argspecs.length-1
-		while i>=0 do
-			#GridFlow.post "argspecs[%i]=%s", i, @argspecs[i].inspect
-			#GridFlow.post "argspecs[%i] isa %s", i, @argspecs[i].class
-			#GridFlow.post "      pa[%i]=%s", i, pa[i].inspect
-			v = pa[i]
-			if not v then
-				if Array===@argspecs[i] and @argspecs[i][2] then
-					v = @argspecs[i][2]
-				elsif @argspecs[i].to_s!="*"
-					#raise "missing argument!"
-					GridFlow.post "missing %d argument", i+1
-					next
-				end
-			end
-			if @argspecs[i].to_s=="*" then
-				rest = pa[i..-1]||[]
-				send_out i,:list,*rest
-			else
-				case v
-				when Symbol; send_out i,:symbol,v
-				when  Array; send_out i,:list, *v
-				when    nil; GridFlow.post "would send nil for pa[#{i}], but..."
-				else         send_out i,        v
-				end
-			end
-			i-=1
-		end
-		if pa.length > @argspecs.length and @argspecs[-1].to_s!="*" then
-			GridFlow.post "warning: too many args (%d for %d)", pa.length, @argspecs.length
-			GridFlow.post "... argspecs=%s", at argspecs.inspect
-			GridFlow.post "... but got %s",pa.inspect
-		end
-		loadbang.each {|m| send_out @argspecs.length, *m }
-	end
 }
 
 FObject.subclass("rubysprintf",2,1) {



More information about the Gridflow-cvs mailing list