[Proto-Scripty] Re: onClick vs Element.observe

2009-11-19 Thread ColinFine
On Nov 18, 2:00 pm, Eric lefauv...@gmail.com wrote: Hi, I also think delegation is the better approach. However, I did notice that none of the examples was dealing with the case where the user click on something that is not a '.item'. You may want to do something like this: function

[Proto-Scripty] PDoc documentation modification

2009-11-19 Thread Bertrand
Hi, I was not too happy about the fact that the new version of the documentation wasn't on par with the old one in terms of examples and coverage. So I dove into github and began tackling the issue (the docs are open source after all). I wanted to send a tiny modification at first and my goal was

Re: [Proto-Scripty] Re: Maybe OT: passing a function name to a function

2009-11-19 Thread bill
T.J. Crowder wrote: Hi Bill, If I'm reading you right, you want to pass a callback into another function. Functions are first-class objects in JavaScript so there's nothing special you need to do (and certainly no need for eval). Say you have a logging function: function logMsg(msg) {

Re: [Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-19 Thread bill
Alex McAuley wrote: Sorry i get what u mean now!.. Example: function myFunction(options) { alert(options.id); eval(mySecondFunction);// Be very aware that evaluation is bad as JS can be injected if you do not sanitise strings correctly }

[Proto-Scripty] Re: Animated Drop Down with Scrollbar won't display

2009-11-19 Thread Blue Hand Talking
And here is the script for the drop down menu: http://pastie.org/705995 jet On Nov 17, 6:03 pm, Blue Hand Talking j...@whidbey.com wrote: As a note, the script I am using is at:    http://livepipe.net/control/scrollbar ...and is by Ryan Johson. And a side note to the admin: Even

[Proto-Scripty] Re: How do I drag out of a droppable

2009-11-19 Thread Jason Whitmer
I fixed the issue. The trick is to set the html body element as a droppable. Droppables.add('body',{accept:'dragme',onDrop:dropBody}); function dropBody(dragged, dropped, event) { dropped.appendChild(dragged); } And add the ID to the body tag: body id=body On Nov 18, 12:27 pm, Jason

[Proto-Scripty] Limit number of draggables allowed in a droppable

2009-11-19 Thread Jason Whitmer
How do I limit a Droppable to contain only 1 Draggable? I have a Droppable: div id=myDroppable div id=staticTextDescription/div /div And a Draggable: div id=myDraggable DRAG ME /div Which I setup like this: Droppables.add('myDroppable'); new Draggable('myDraggable'); Thank you, Jason

Re: [Proto-Scripty] Limit number of draggables allowed in a droppable

2009-11-19 Thread Alex McAuley
If i recall correctly there is an onDrop function that you can call when initialising the droppable... So what i would do is ondrop count the elements with the classname that are inside the droppable... or even easier .. ondrop update a hidden element on the page to the value of the number of

[Proto-Scripty] Re: PDoc documentation modification

2009-11-19 Thread Tobie Langel
Hi. I understand your frustration. TJ who was handling the doc up until now has very recently resigned. We haven't found anyone to replace him in this role yet. Until then, you might see some fluctuations in how fast these changes are pulled upstream. Would you mind posting a link to these