[Gridflow-cvs] [svn] commit: r3542 - in /trunk: TODO base/main.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 15 22:29:54 EDT 2008


Author: matju
Date: Tue Apr 15 22:29:53 2008
New Revision: 3542

Log:
temporarily remove support for method "get" supported by all GF objects

Modified:
    trunk/TODO
    trunk/base/main.rb

Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Tue Apr 15 22:29:53 2008
@@ -490,6 +490,39 @@
   alias _1_symbol _1_list
 }
 
-
+class FObject
+	def self.gfattrs; @gfattrs={} if not defined? @gfattrs; @gfattrs end
+	def self.gfattr(s,*v)
+		s=s.intern if String===s
+		gfattrs[s]=v
+		attr_accessor s
+		module_eval "def _0_#{s}(o) self.#{s}=o end"
+	end
+	def self.help
+		gfattrs.each{|x,v|
+			s =      "attr=%-8s" % x
+			s <<    " type=%-8s" % v[0] if v[0]
+			s << " default=%-8s" % v[1] if v[1] # what default="false" ?
+			GridFlow.post "%s", s
+		}
+		GridFlow.post "total %d attributes", gfattrs.length
+	end
+	def _0_help; self.class.help end
+	def self.gfattrs; @gfattrs={} if not defined? @gfattrs; @gfattrs end
+	def self.gfattr(s,*v)
+		s=s.intern if String===s
+		gfattrs[s]=v
+		attr_accessor s
+		module_eval "def _0_#{s}(o) self.#{s}=o end"
+	end
+	def _0_get(s=nil)
+		s=s.intern if String===s
+		if s then
+			if respond_to? s then send_out noutlets-1,s,__send__(s) else ___get s end
+		else
+			self.class.gfattrs.each_key{|k| _0_get k }
+		end
+	end
+end
 
 there are bugs with abstractions that use [route]->[list] instead of [route2] because they fail when $1="list".

Modified: trunk/base/main.rb
==============================================================================
--- trunk/base/main.rb (original)
+++ trunk/base/main.rb Tue Apr 15 22:29:53 2008
@@ -5,24 +5,8 @@
 @data_path=[GridFlow::DIR+"/images"]
 class ::Object; def FloatOrSymbol(x) Float(x) rescue x.intern end end
 class FObject
-	def self.inspect; @pdname or super; end
-	def self.gfattrs; @gfattrs={} if not defined? @gfattrs; @gfattrs end
-	def self.gfattr(s,*v)
-		s=s.intern if String===s
-		gfattrs[s]=v
-		attr_accessor s
-		module_eval "def _0_#{s}(o) self.#{s}=o end"
-	end
 	def initialize2; end
 	def initialize(*) end
-	def _0_get(s=nil)
-		s=s.intern if String===s
-		if s then
-			if respond_to? s then send_out noutlets-1,s,__send__(s) else ___get s end
-		else
-			self.class.gfattrs.each_key{|k| _0_get k }
-		end
-	end
 end
 def GridFlow.find_file s
 	s=s.to_s



More information about the Gridflow-cvs mailing list