[mochikit] Re: How to set log level of default logger?
Thanks. I am fairly new to JavaScript frameworks and "advanced" JS programming, but if ultimately I find an opportunity to contribute, I will gladly do so. So far I enjoy working with MochiKit very much. Per Cederberg wrote: > Actually, I don't think it is possible (from reading only the > documentation). The log filtering is only applied to listeners. But > even they cannot affect what is being sent to the native console. > > I think you'd have to assign some of the log* methods to > MochiKit.Base.noop in order to silence their log messages. Or replace > the default logger with your own. > > Now, I'm planning to revamp the logging sometime to alleviate issues > like this. While not breaking backwards compability I hope. But if you > are interested, feel free to send patches to the list. > > Cheers, > > /Per --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] MochiKit 1.4.2 released
MochiKit 1.4.2 has now been released and is available on the web site: http://mochikit.com/download.html http://svn.mochikit.com/mochikit/tags/MochiKit-1.4.2/packed/MochiKit/customize.html This version contains the correction of a few issues found since the last release: * More fixes in MochiKit.Style.getElementDimensions for IE and hidden elements (#325). * Fixed issue in MochiKit.Style.getViewportDimensions when called within the document HEAD. * Fixed MochiKit.DOM.coerceToDOM() handling of arrays when MochiKit.Iter is not loaded (#328). Many thanks to everyone involved for the excellent feedback and bug reports! Cheers, /Per --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Drag & Drop Issues - On Drop item flies in from off screen.
I have an issue with my drag and drop script and I can't seem to figure out what's going on. The code below is complete enough to show the problem. The issue is that when I drop an item onto a dropable element, the item comes flying from off the page to eventually land on the dropable element. I've been over the docs and googled the problem but can't seem to find exactly what I'm looking for. I've also tried hacking it so the element hides itself after the mouse-up and then shows itself after it "lands" but to no avail. Any help would be greatly appreciated. .draggable { color: #00; cursor: move; position: relative; display: inline; } .empty { background: #ee; color: #00; } .filled { background: #ff; color: #00; } function S4() { return (((1+Math.random())*0x1)|0).toString(16).substring(1); }; function guid() { return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); }; var draggable_objects = new Array(); var droppable_objects = new Array(); function createDraggableById(element_id) { return new MochiKit.DragAndDrop.Draggable(element_id, { revert: true, handle: false, starteffect: MochiKit.Visual.Opacity, endeffect: MochiKit.Visual.Opacity, zindex: 1000, setclass: null, ghosting: null, onchange: MochiKit.Base.noop, scroll: false, scrollSensitivity: 20, scrollSpeed: 15 }); }; function dropFunction(element, onto) { if(onto.parentNode.className=="filled") return false; p = element.parentNode; onto.parentNode.className="filled"; p.parentNode.className="empty"; onto.appendChild(element); return true; }; function makeDraggables() { var draggable_class_elements = getElementsByTagAndClassName('*', 'draggable'); for(element in draggable_class_elements) { draggable_class_elements[element].id = guid(); draggable_objects[draggable_class_elements[element].id] = createDraggableById(draggable_class_elements[element].id); } }; function makeDroppables() { var droppable_class_elements = getElementsByTagAndClassName('*', 'droppable'); for(element in droppable_class_elements) { droppable_class_elements[element].id = guid(); droppable_objects[droppable_class_elements[element].id] = new MochiKit.DragAndDrop.Droppable(droppable_class_elements[element].id, { greedy: true, ondrop: dropFunction } ); } }; function init_matchups_drag_and_drop() { makeDraggables(); makeDroppables(); }; Drag & Drop For Schedule Prototype vs. Team A Team B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: How to set log level of default logger?
Actually, I don't think it is possible (from reading only the documentation). The log filtering is only applied to listeners. But even they cannot affect what is being sent to the native console. I think you'd have to assign some of the log* methods to MochiKit.Base.noop in order to silence their log messages. Or replace the default logger with your own. Now, I'm planning to revamp the logging sometime to alleviate issues like this. While not breaking backwards compability I hope. But if you are interested, feel free to send patches to the list. Cheers, /Per On Thu, Nov 27, 2008 at 4:36 PM, Bjoern <[EMAIL PROTECTED]> wrote: > > Another basic question, but maybe you could also understand it as a > "documentation bug": I have a hard time to understand how to set the > log level of the default logger? > > How can I access the "default logger"? And actually how are > "listeners" and the LoggingPane related - is a LoggingPane a listener? > > I guess I don't understand the Logging framework at all, except that > when I write log("something") it appears in firebug and/or the > LoggingPane... > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] How to set log level of default logger?
Another basic question, but maybe you could also understand it as a "documentation bug": I have a hard time to understand how to set the log level of the default logger? How can I access the "default logger"? And actually how are "listeners" and the LoggingPane related - is a LoggingPane a listener? I guess I don't understand the Logging framework at all, except that when I write log("something") it appears in firebug and/or the LoggingPane... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---