La Campanella
2007-Mar-30  20:59 UTC
Hi, I love prototype very much, can I join the developer''s team?
I love prototype very much.
But I still want to join your team, to make the prototypejs much
better.
I think I must show sometime that can let prototype know my ability in
Javascript.
the code behind is a example by me. This Object which name is obs can
listen to any object, when it has been changed by any type of value,
the callback will be actived.
I think this function will be useful in Web application.
the online example: www.mybooth.jp/test.htm
My other demo project is http://www.mystart.co.jp/
I love prototype, if I can join it, in my future project, I will not
need to write my own code to plus on rototype, because I will be join
it :)
Wait for your mail
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<script src="js/p.js"></script>
</head>
<body>
<textarea id="txttest">the callback will be actived after you
change
this text</textarea>
<script>
var objs={test:123456,test2:23423};
var obs={
				run:[],// {fv:"",obj:"",cb:"",tp:true/false}
				timer:null,
				timework:function(){
										if(obs.run.length==0)
										{
											clearInterval(obs.timer);
											return;
										}
										obs.run.each(
											function(o)
											{
												if(!o)return;
												var n=obs.run.indexOf(o);
												if(eval("o.fv!="+o.obj))
												{
													obs.run[n]=null;
													obs._initrun();
													o.cb();
												}
											}
										)
									},
				_initrun:function(){
										var tmp=[];
										obs.run.each(
											function(o){
												if(o)tmp.push(o);
											}
										);
										obs.run=tmp;
									},
				_setTimer:function(){if(!
obs.timer)obs.timer=setInterval("obs.timework();",200);},
				add:function(id,obj,cb){
											if(!id||!obj||!cb)return;
											obs.run.push({id:id,fv:eval(obj+";"),obj:obj,cb:cb});
											obs._setTimer();
										},
				remove:function(id){
										if(!id)return;
										obs.run.each(
											function(o)
											{
												if(o.id==id)
												{
													var n=obs.run.indexOf(o);
													obs.run[n]=null;
													obs._initrun();
												}
											}
										);
									}
			}
		
obs.add("id1","$(''txttest'').value",function(){alert("txt
changed!!!")});
		
obs.add("id2","objs.test",function(){alert("test1ok")});
		
obs.add("id3","objs.test2",function(){alert("test2ok")});
</script>
<button onclick="objs.test=222">change test1</button>
<button onclick="objs.test2=222">change
test2</button><br/>
<button onclick="obs.remove(''id1'')">remove
listener1,and the callback
will not be actived after you change the text</button>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Martin Ström
2007-Mar-31  09:15 UTC
Re: Hi, I love prototype very much, can I join the developer''s team?
Hej if you''re intrested in joining the core team you should start with contributing well written patches, tests and bug fixes etc to the trac. Look here: http://prototypejs.org/contribute Good luck! Martin On 3/30/07, La Campanella <gms2mo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I love prototype very much. > > But I still want to join your team, to make the prototypejs much > better. > > I think I must show sometime that can let prototype know my ability in > Javascript. > the code behind is a example by me. This Object which name is obs can > listen to any object, when it has been changed by any type of value, > the callback will be actived. > > I think this function will be useful in Web application. > the online example: www.mybooth.jp/test.htm > > My other demo project is http://www.mystart.co.jp/ > > I love prototype, if I can join it, in my future project, I will not > need to write my own code to plus on rototype, because I will be join > it :) > > Wait for your mail > > > > > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <script src="js/p.js"></script> > </head> > > <body> > <textarea id="txttest">the callback will be actived after you change > this text</textarea> > > <script> > var objs={test:123456,test2:23423}; > var obs={ > run:[],// {fv:"",obj:"",cb:"",tp:true/false} > timer:null, > timework:function(){ > if(obs.run.length==0) > { > clearInterval(obs.timer); > return; > } > obs.run.each( > function(o) > { > if(!o)return; > var n=obs.run.indexOf(o); > if(eval("o.fv!="+o.obj)) > { > obs.run[n]=null; > obs._initrun(); > o.cb(); > } > } > ) > }, > _initrun:function(){ > var tmp=[]; > obs.run.each( > function(o){ > if(o)tmp.push(o); > } > ); > obs.run=tmp; > }, > _setTimer:function(){if(! > obs.timer)obs.timer=setInterval("obs.timework();",200);}, > add:function(id,obj,cb){ > if(!id||!obj||!cb)return; > obs.run.push({id:id,fv:eval(obj+";"),obj:obj,cb:cb}); > obs._setTimer(); > }, > remove:function(id){ > if(!id)return; > obs.run.each( > function(o) > { > if(o.id==id) > { > var n=obs.run.indexOf(o); > obs.run[n]=null; > obs._initrun(); > } > } > ); > } > } > > obs.add("id1","$(''txttest'').value",function(){alert("txt > changed!!!")}); > obs.add("id2","objs.test",function(){alert("test1ok")}); > obs.add("id3","objs.test2",function(){alert("test2ok")}); > </script> > <button onclick="objs.test=222">change test1</button> > <button onclick="objs.test2=222">change test2</button><br/> > <button onclick="obs.remove(''id1'')">remove listener1,and the callback > will not be actived after you change the text</button> > </body> > </html> > > > > >-- burnfield.com/martin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
La Campanella
2007-Mar-31  17:13 UTC
Re: Hi, I love prototype very much, can I join the developer''s team?
OK,I will, thanks for your answer :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
La Campanella
2007-Mar-31  17:15 UTC
Re: Hi, I love prototype very much, can I join the developer''s team?
OK,I will, thanks for your answer :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
La Campanella
2007-Mar-31  17:18 UTC
Re: Hi, I love prototype very much, can I join the developer''s team?
OK,I will, thanks for your answer :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---