[Proto-Scripty] Re: Regarding selector engine in prototype.

2009-12-14 Thread Tobie Langel

Hi, pradeep.

 1) what selector engine does  prototype  uses currently ?

Currently, it's own. As of next version (and currently in our master
branch already), Prototype will be selector engine agnostic (meaning
you can choose your own at build time) and will default to Sizzle.

 2)is it better than selector engine like sizzle in jquery

It's noticeably slower.

Best,

Tobie

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Object mashup

2009-12-14 Thread julien Devouassoud
Do you mean : hosw to find it's parent ?


2009/12/10 maalek maaa...@gmail.com

 Hello

 I have problem with my Objects. My object have many props and method,
 one of this is td (screen reprezentation of the object). I observe
 click event to obj.td where I do many things on this object and change
 td (screen reprezentation). My question : how find object where is
 attach clicked td ?

 Now I setAttribute to td something like obj_id, when td is clicked
 first I read this attribute from td, find proper object by this id, do
 what to do and finnaly change state of obj.td. This works fine but
 when I have very many obj (like thousand), find object takes many time
 (find object is longer then do what to do).


 Here is simple example :

 // example START

 Event.observe(window, 'load', function() {
  onLoad();
 });

 var objTrs = [];
 var msg = null;

 function onLoad(){

  msg = document.createElement(div);
  msg.innerHTML = Click on cell;
  $(document.body).appendChild(msg);

  var table = document.createElement(table);
  var tableBody = document.createElement(tbody);
  table.appendChild(tableBody);
  $(document.body).appendChild(table);
  table.border=1

  for(var i = 0; i  10; i++){
var myTr = {};
myTr.counter = 0;
myTr.tr = document.createElement(tr);
myTr.objTds = [];
objTrs.push(myTr);
for (var j = 0; j  10; j++){
  var myTd = {};
  myTd.counter = 0;
  myTd.td = document.createElement(td);
  myTd.td.setAttribute('tr_id',i);
  myTd.td.setAttribute('td_id',j);
  myTd.td.innerHTML = myTr.counter + _ + myTd.counter;
  myTr.objTds.push(myTd);
  myTr.tr.appendChild(myTd.td);

  Event.observe(myTd.td, 'click', function() {
// find tr object in array
var tr_id = this.getAttribute(tr_id);
var myTr = objTrs[tr_id];
myTr.counter++;
// find proper td in myTr
var td_id = this.getAttribute(td_id);
var myTd = myTr.objTds[td_id];
myTd.counter++;
var msgTxt = you click  + myTr.counter +  times on this TR
 and  + myTd.counter +  on this TD;
myTd.td.innerHTML = myTr.counter + _ + myTd.counter;
msg.innerHTML = msgTxt;
  });

}
tableBody.appendChild(myTr.tr);
  }

 }

 // example STOP

 Best regards
 maalek

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.




--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: When Ajax Insert Expands Page Downward...

2009-12-14 Thread Dave L
Yea, that is what I ended up doing.  Thanks.

On Dec 7, 12:24 pm, Rick Waldron waldron.r...@gmail.com wrote:
 Yes and it drives me nuts. I'm sure there is a correct way of fixing this, 
 but i'm ok with just setting somekind of footer content below the fold so 
 that I always have scroll bars

 -- Sent from my Palm Prē

 Dave L wrote:

 I am having an issue:  when inserting a number of elements that end up

 push the page downward so that the scroll bar has to be adjusted, all

 of the css shifts to the left.  I am using firefox 3.0 and have

 noticed this occurance before.  Has anyone else come across this or

 know what might be causing this?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype amp; script.aculo.us group.

 To post to this group, send email to prototype-scriptacul...@googlegroups.com.

 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.

 For more options, visit this group 
 athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.