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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Apr 4 14:59:06 EDT 2008


Author: matju
Date: Fri Apr  4 14:59:06 2008
New Revision: 3468

Log:
fixed [args]

Modified:
    trunk/base/flow_objects.rb

Modified: trunk/base/flow_objects.rb
==============================================================================
--- trunk/base/flow_objects.rb (original)
+++ trunk/base/flow_objects.rb Fri Apr  4 14:59:06 2008
@@ -94,10 +94,6 @@
         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
 }
-
-#<vektor> told me to:
-# RGBtoYUV : @fobjects = ["#inner (3 3 # 66 -38 112 128 -74 -94 25 112 -18)","@ >> 8","@ + {16 128 128}"]
-# YUVtoRGB : @fobjects = ["@ - (16 128 128)",#inner (3 3 # 298 298 298 0 -100 516 409 -208 0)","@ >> 8"]
 
 FObject.subclass("args",1,1) {
 	def initialize(*argspecs) @argspecs = argspecs end
@@ -124,16 +120,17 @@
 			if @argspecs[i].to_s=="*" then
 				rest = pa[i..-1]||[]
 				send_out i,:list,*rest
-				break
-			end
-			case pa[i]
-			when Symbol; send_out i,:symbol,v
-			when  Array; send_out i,:list, *v
-			else         send_out i,        v
+			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 then
+		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



More information about the Gridflow-cvs mailing list