Hi Charles,
(I'm sending this conversation back to the RoR spinoffs list - I presume you
hadn't intended to mail me personally.)
> I'm not used to using debugger, could you give me a hand as to where
> to put the statements so that they could be usefull?
>
In general, you need only one debugger; statement per
anonymous/inner/not-top-level function, to allow the MS debuggers to get
started. Once they're inside that scope, they can happily drill down into
other function calls as usual. The only thing they don't understand is
setting breakpoints interactively by clicking the LHS gutter of the text
editor.
Debugging inside a ternary operator is a bit of a pain, so I suggest you
rewrite it a little (temporarily!) as follows.
> (this.findElements(element, options) || []).each( function(e) {
> // handles are per-draggable
> var handle = e;
> if (options.handle){
> debugger;
> handle=$(e);
> handle=handle.down('.'+options.handle,0); //<--- step into
> }
> options.draggables.push(
> new Draggable(e, Object.extend(options_for_draggable,
> { handle: handle })));
> Droppables.add(e, options_for_droppable);
> if(options.tree) e.treeNode = element;
> options.droppables.push(e);
> });
>
You'll only hit the debugger statement if you're using ahandle, can verify
that $(e) exists, and then step into Element.down() to see what's going on
there.
If you're using the free script debugger, the best way to see what's happening
is to use the command window to type in expressions, and have them evaluated
on the fly.
HTH
Dave
--
----------------------
Author
Ajax in Action http://manning.com/crane
Ajax in Practice http://manning.com/crane2
Prototype & Scriptaculous in Action http://manning.com/crane3
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---