Re: [mochikit] Does anyone use this?

2017-05-26 Thread troels knak-nielsen
Whoa. Blast from the past. Mochi was way ahead of the curve 10 years ago. I used it last around 2009. At that point jquery had sort of taken the position, as I remember it. For sake of a bit of code archeology, there were definitely other tool kits even before Mochi. I think xb (xbrowser?) was

Re: [mochikit] Re: Server side Javascript logging

2013-05-26 Thread Troels Knak-Nielsen
Really? This thread is more than 4 years old. I'm sure jslogger is a fine product, but this is just border line of spam. On 26 May 2013 18:20, Dumitru Glavan dumitru...@gmail.com wrote: You might try JSlogger http://jslogger.com - we built it exactly for the same reason. We have a couple of

[mochikit] Re: getElementById

2009-01-25 Thread troels knak-nielsen
var url = document.getElementById(url).value; but if you're using MochiKit, you could shorten it to: var url = $(url).value; -- troels 2009/1/25 Boštjan Jerko ml...@japina.eu: Hello! I have an HTML page from which I'd like to read username data and url to my javascript, for

[mochikit] Re: Server side Javascript logging

2009-01-15 Thread troels knak-nielsen
You can try hooking a handler up to window.onerror although this chart suggests that it may only work on certain browsers: http://www.quirksmode.org/dom/events/index.html Maybe there are some browser-specific alternatives for those that don't support this. -- troels On Thu, Jan 15, 2009

[mochikit] Re: Ajax request returns

2008-10-26 Thread troels knak-nielsen
On Sun, Oct 26, 2008 at 4:20 AM, Arnar Birgisson [EMAIL PROTECTED] wrote: Have you tried... AjaxUpdater = function (id, page) { var d = doSimpleXMLHttpRequest(page); d.addCallback(function (req) { getElement(id).innerHTML = req.responseText; adding it here

[mochikit] Re: MochiKit 1.4 released

2008-10-21 Thread troels knak-nielsen
On Wed, Oct 22, 2008 at 12:01 AM, Arnar Birgisson [EMAIL PROTECTED] wrote: Per: Many thanks for taking matters by such firm hands lately. I hope the countless people begging for a release here realize what kind of an effort it is. We do. It's appreciated. -- troels

[mochikit] Re: Preparing for a MochiKit 1.4 release

2008-10-12 Thread troels knak-nielsen
On Wed, Oct 8, 2008 at 5:07 PM, Per Cederberg [EMAIL PROTECTED] wrote: In Opera 9.50 Beta 2 they added support for getBoundingClientRect, so then the test won't break anymore (taking another code path inside MochKit.Style.getElementPosition actually). Would that be ok with you? A little late

[mochikit] Re: Class inheritance

2008-10-08 Thread troels knak-nielsen
On Wed, Oct 8, 2008 at 12:56 AM, Akari no ryu [EMAIL PROTECTED] wrote: Troels, the problem with using prototypical inheritance is that you end up losing scope in, for example, AJAX request responses or DOM event handlers. If you want to keep scope in an event handler, you can delegate to it,

[mochikit] Re: Preparing for a MochiKit 1.4 release

2008-10-08 Thread troels knak-nielsen
On Wed, Oct 8, 2008 at 3:54 PM, Per Cederberg [EMAIL PROTECTED] wrote: Opinions? What does Bob think? Hooray. On Wed, Oct 8, 2008 at 3:54 PM, Per Cederberg [EMAIL PROTECTED] wrote: You can also contribute by running the test suite in your favorite browser environments. Below is a link and

[mochikit] Re: Class inheritance

2008-10-07 Thread troels knak-nielsen
I never used `bindMethods`. I can see why a Pythonista might find it intuitive, but quite frankly, it's reveals a fundamental misunderstanding of the language being used. Javascript does not have classes, and trying to emulate them is going to be a very leaky abstraction. You would be much better

[mochikit] Re: MochiQuery

2008-06-17 Thread troels knak-nielsen
On Tue, Jun 17, 2008 at 6:23 AM, machineghost [EMAIL PROTECTED] wrote: So before I waste a bunch of time trying to fix such issues, I thought it might help to ask if anyone else had played around with this sort of thing before. Or for that matter, is anyone actually using anything like this?

[mochikit] Re: MochiQuery

2008-06-17 Thread troels knak-nielsen
On Tue, Jun 17, 2008 at 5:07 PM, machineghost [EMAIL PROTECTED] wrote: 1. Chainability: with this syntax you can chain functions do stuff like: someObject.update(updateObject1).update(updateObject2); True, that _is_ something that can't be done with function-oriented syntax. Personally,

[mochikit] Re: other widget toolboxes most compatbile with mochikit?

2008-03-02 Thread troels knak-nielsen
On Sun, Feb 17, 2008 at 7:05 AM, Jason Bunting [EMAIL PROTECTED] wrote: Others?! These are the only ones I know of and have ever heard of - while there is nothing wrong with people developing their own MochiKit-based stuff There is plotkit: http://www.liquidx.net/plotkit/ And I made a

[mochikit] Re: 1.4, again

2007-10-16 Thread troels knak-nielsen
On 10/16/07, Daniel Fetchinson [EMAIL PROTECTED] wrote: Five months ago someone posted a list of blocking bugs: On May 15, 9:57 pm, sayrer [EMAIL PROTECTED] wrote: http://trac.mochikit.com/ticket/113 http://trac.mochikit.com/ticket/226 http://trac.mochikit.com/ticket/228

[mochikit] Re: running alongside mootools?

2007-09-19 Thread troels knak-nielsen
It's been a while now, since I played around with moo, but the biggest problem is, that it's based on prototype, which means that there are plenty of overrides of built-in's (See: http://docs.mootools.net/Native/Array.js ). This makes it hard to use together with other libraries, and you can't

[mochikit] fireNativeEvent

2007-04-22 Thread troels knak-nielsen
I don't recall if this has been discussed before, but I found myself in need of a cross browser way to fire a native event (In particular onchange) on a HTMLElement. After some sporadic research, I have put together the following function: /** * Fires a native HTMLEvent on an HTMLElement *

[mochikit] extendURL

2007-04-04 Thread troels knak-nielsen
From time to other, I find myself needing to manipulate the query-string of URLs in javascript. I have put together the following function. Is this general enough to put into mk? extendURL = function(url, parameters) { var parts = url.split(/\?/); var base = parts[0]; var args =

[mochikit] fortifysoftware securityreport

2007-04-03 Thread troels knak-nielsen
This might be of interest. http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf -- troels --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send

[mochikit] Re: fortifysoftware securityreport

2007-04-03 Thread troels knak-nielsen
= arguments[0].responseText.replace(re, $1); +return eval('(' + json + ')'); }, /** @id MochiKit.Async.succeed */ === On Apr 3, 6:35 am, troels knak-nielsen [EMAIL PROTECTED] wrote: This might be of interest

[mochikit] Re: fortifysoftware securityreport

2007-04-03 Thread troels knak-nielsen
If the server-side doesn't send arrays, then it's not a problem and we don't need a new specification or any changes to the clients. If nothing else, it's probably a good thing to mention in the documentation. -- troels --~--~-~--~~~---~--~~ You received this

[mochikit] Re: Simple callback/signal example please

2007-02-20 Thread troels knak-nielsen
That's because the button doesn't exist in the document tree until you add it in there with swapDOM. If you move the swapDOM line up before connect, it should work with either way. On 2/20/07, Dave Whiteley [EMAIL PROTECTED] wrote: I have written a trivial app which works on Firefox but not on

[mochikit] Re: Browse the Web faster than Internet explorer and Its free

2007-02-13 Thread troels knak-nielsen
STOP THINKING Don't waste Time Now that's an add with some serious attitude! -- troels --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to

[mochikit] Re: A IE problem - non-Mochikit JavaScript

2007-01-30 Thread troels knak-nielsen
--- A Runtime Error has occurred. Do you wish to Debug? Line: 154 Error: 'sucess' is not defined --- It's a typo - success and sucess. You should install Microsoft Script Debugger for IE. It's not firebug, but it does help a bit. On 1/30/07, Lee

[mochikit] Re: DomContentLoaded?

2007-01-23 Thread troels knak-nielsen
I'm using the code from http://webreflection.blogspot.com/2006/09/better-domcontentloaded.html Works like a charm AFAIK. -- troels On 1/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I see that the ticket for a DomContentLoaded signal (http://trac.mochikit.com/ticket/192) has been moved

[mochikit] Re: Date Picker

2007-01-10 Thread troels knak-nielsen
There's this (Which I'm the author of): http://candyscript.com/projects/minikit/samples/date.html And then there's the calendar component from ui4w: http://ui4w.sourceforge.net/UI4W/packed/samples/browser.html -- troels On 1/10/07, Mulugeta Maru [EMAIL PROTECTED] wrote: Is there a date

[mochikit] Re: Date Picker

2007-01-10 Thread troels knak-nielsen
On 1/10/07, Jorge Godoy [EMAIL PROTECTED] wrote: troels knak-nielsen [EMAIL PROTECTED] writes: There's this (Which I'm the author of): http://candyscript.com/projects/minikit/samples/date.html How I18Nized is it? How can I instruct it to show month names in pt_BR and use dd/mm/

[mochikit] Re: Date Picker

2007-01-10 Thread troels knak-nielsen
You colud try using dojo together with mochikit. There was a post about that recently: http://groups.google.com/group/mochikit/browse_thread/thread/69bf2f2b9dac2e70/ac72feaa754027fd -- troels On 1/10/07, Mulugeta Maru [EMAIL PROTECTED] wrote: I am looking for something like this

[mochikit] Re: MochiKit.Date

2006-12-11 Thread troels knak-nielsen
The Javascript Date object is notoriously buggy. I would prefer an exception when supplying invalid input data. On 12/11/06, Bob Ippolito [EMAIL PROTECTED] wrote: It's not a bug, that's what the JavaScript Date object does. I don't see a particularly good reason to fix this. -bob On

[mochikit] Re: getElementPosition versus Opera

2006-12-07 Thread troels knak-nielsen
Yep - it works. On 12/7/06, Thomas Hervé [EMAIL PROTECTED] wrote: I think it comes from an Opera bug for some element with a specific display. YUI already handles problem with 'inline', but I think there's also a problem with 'table-row'. Can you try the following patch: --- Style.js

[mochikit] getElementPosition versus Opera

2006-12-06 Thread troels knak-nielsen
I think, I've found a bug in MochiKit.Style.getElementPosition on Opera. When selecting the position of an element, contained in a table cell, the position isn't calculated correctly. Quirksmode findPos function gets the right result, for reference: http://www.quirksmode.org/js/findpos.html

[mochikit] Re: How do you wait for an asyncronous event?

2006-11-13 Thread troels knak-nielsen
Deferred is happening asynchronous, so you can't think in incremental, imperative code. You pseuodosample could f.ex. be written as: div id=out/div input type=button id=btn value=clickme / script var onClick = function() { var onCheck = function(data) {

[mochikit] Re: how to pan div contents

2006-11-11 Thread troels knak-nielsen
Show us your code. On 11/10/06, Diez B. Roggisch [EMAIL PROTECTED] wrote: Hi, I'm currently creating a TurboGears Tile-widget, like google maps has for example. So far things are smooth, displaying and moving work. Now what I would love to do is to enable that panning of the contents of

[mochikit] Re: iterating through dictionary

2006-11-10 Thread troels knak-nielsen
Using Iter : forEach(r.items, function(item) { log(item); }); ... or even: forEach(r.items, log); On 11/10/06, .M. [EMAIL PROTECTED] wrote: Dol! I get it now for (x in r.items) { log(x); for (y in r.items[x]) {

[mochikit] Re: Announcing MochiKit.Animator - an animation engine that doesn't suck

2006-11-08 Thread troels knak-nielsen
That is so cool. On 11/8/06, Karl Guertin [EMAIL PROTECTED] wrote: var animation = cssAnimation(color:red; opacity: 0.5,$('example')); animation.play(); Get it at: http://gr.ayre.st/~grayrest/animator/animator.html MochiKit.Animator is an enhanced, fully vectorized version of

[mochikit] minikit

2006-10-31 Thread troels knak-nielsen
I have created a lightweight collection of widgets and visual effects (hereunder a port of moo.fx visual fx library), which are compatible with mochikit or can be used standalone. The package can be downloaded from: http://candyscript.com/projects/minikit/ -- troels

[mochikit] Re: Not sure how to properly pass parameters to connect().

2006-10-18 Thread troels knak-nielsen
in JavaScript, Python, Ruby, etc. -bob On 10/17/06, troels knak-nielsen [EMAIL PROTECTED] wrote: Apart from the obvious, that Bob had event.stop(); in his example (Which you could add if you need it, but most likely you don't), there is one peculiar detail. Some javascript interpreters

[mochikit] Re: Not sure how to properly pass parameters to connect().

2006-10-17 Thread troels knak-nielsen
/ But in general, my solution will work, and since it's shorter and easier to read, I think it's preferable. On 10/17/06, Chris W. Parker [EMAIL PROTECTED] wrote: At Saturday, October 14, 2006 10:06 AM troels knak-nielsen said: Or simply: connect('target1', 'onclick', function() { change_html

[mochikit] Re: Not sure how to properly pass parameters to connect().

2006-10-14 Thread troels knak-nielsen
Or simply: connect('target1', 'onclick', function() { change_html('target1', 'new html'); }); On 10/14/06, Bob Ippolito [EMAIL PROTECTED] wrote: On 10/13/06, Chris [EMAIL PROTECTED] wrote: Hello, I'm just trying to do a really simple thing by setting an event on an element with

[mochikit] Re: Please help me decide ideal implementation

2006-10-11 Thread troels knak-nielsen
Watch out for views in mysql. If the view contains a calculated field (such as MAX() etc.), mysql can't optimize the search correctly, which will result in full table scans, severely hurting performance. Views are bad for performance in mysql until they get this fixed. Indices are a really good

[mochikit] Re: is there a unique array function ?

2006-10-09 Thread troels knak-nielsen
Isn't that what filter does ? http://mochikit.com/doc/html/MochiKit/Base.html#fn-filter On 10/9/06, Bob Ippolito [EMAIL PROTECTED] wrote: On 10/9/06, b3d70 [EMAIL PROTECTED] wrote: I wanna know, is there any function in mochikit which can check each value of an array and produce a new

[mochikit] Re: CSS selectors

2006-10-05 Thread troels knak-nielsen
cssQuery is the best implementation I've seen, and it works nicely together with mochikit. It's a bit heavyweight too though : http://dean.edwards.name/my/cssQuery/ On 10/5/06, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi all, Many javascript libraries have convenience functions for selecting

[mochikit] Re: Mochikit vs. ?

2006-10-04 Thread troels knak-nielsen
Any comparison is bound to get very biased. There was a good comparison article at sitepoint a while back : http://www.sitepoint.com/article/javascript-library All of the libraries mentioned therein are cross-platform. Most javascript theese days are, since it's a lot easier to write

[mochikit] Re: setRequestHeader vs. IE

2006-08-16 Thread troels knak-nielsen
On 8/16/06, Bob Ippolito [EMAIL PROTECTED] wrote: On 8/16/06, troelskn [EMAIL PROTECTED] wrote: I ran into a wierd problem with XmlHttpRequest. It seems that IE for some reason lowercases the key of custom headers (such as X-Ajax-Engine) set with setRequestHeader(). Is this a known

[mochikit] Fwd: [mochikit] scrollable table

2006-08-14 Thread troels knak-nielsen
and opera. (Although a bit quirky in ie). /** * Makes a regular table tbody-scrollable * * (c) Troels Knak-Nielsen, Public Domain * * Version : 11. aug 2006 */ scrollTable = function(table, /* optional */ height) { if (!height) { height = 10em

[mochikit] Re: Iter forEach question: where is the index?

2006-08-04 Thread troels knak-nielsen
You can rewrite your code as ; var i = 0; forEach(togglers, function(e) { e.stretcher = stretchers[i]; i++; }); On 8/4/06, troels knak-nielsen [EMAIL PROTECTED] wrote: I asked the same question recently: http://groups.google.com/group/mochikit/browse_thread/thread/caa986a88bbee128

[mochikit] Re: Problem with tbody and blindUp et al

2006-08-01 Thread troels knak-nielsen
Doh. I thought it was included in the packed file. Why isn't it ? It still doesn't work properly with tbody, though. On 8/1/06, Thomas Hervé [EMAIL PROTECTED] wrote: You have to include the file New.js to use the Visual effects. The error is relatively clear, no ? It means the function

[mochikit] Re: appear and fade makes ie6 memory to explode.

2006-07-25 Thread troels knak-nielsen
On 7/21/06, Alexandre A. Falcão [EMAIL PROTECTED] wrote: But still one question: There is any way to permanently destroy objects created by DOM API?? If you drop all references to it, even IE should be able to wipe it from memory ? --~--~-~--~~~---~--~~ You

[mochikit] Re: on(ready) signal for each class method during runtime

2006-07-14 Thread troels knak-nielsen
dojo toolit has some support for aop : http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book12 that said, i agree with bob - i don't see the need in javascript, where you can easily redefine methods during runtime. On 7/10/06, Bob Ippolito [EMAIL PROTECTED] wrote: On Jul 10, 2006, at 5:17

[mochikit] Re: MK vs Dojo vs YUI vs ?

2006-06-27 Thread troels knak-nielsen
Incidentially, this article may help comparing the various solutions around: http://www.sitepoint.com/article/javascript-library On 6/27/06, Bob Ippolito [EMAIL PROTECTED] wrote: On Jun 26, 2006, at 10:14 PM, [EMAIL PROTECTED] wrote: Newbie question alert... I am a very experienced

[mochikit] Re: MochiKit Base in ActionScript

2006-05-30 Thread troels knak-nielsen
Not that I want to discourage you, or even suggest that MochiKit isn't the best tool available (which I think it is), but make sure you check out http://www.burrrn.com/projects/core2.html since it targets actionscript as much as plain ecmascript. Could be nice though to know that mochi would work

[mochikit] Re: Using Mochikit with my Classes - Looking for Beginner Documentation

2006-05-25 Thread troels knak-nielsen
mochikit doesn't feature a class-emulation kit per se, as other frameworks does. personally i think this is a good thing. I use a variant of the technique described here: http://www.itsalleasy.com/2006/02/24/classjs-third-time-is-the-charm/ For some reading/discussion on the subject, I suggest

[mochikit] Re: stopPropagation() and onclick

2006-04-04 Thread troels knak-nielsen
You need to call e.preventDefault() aswell. Or just use e.stop(); On 4/4/06, Melkor [EMAIL PROTECTED] wrote: I'm connecting anchors (a) with a signal that calls the event.stopPropagation() method. My intent is for the anchor not to be followed. Previously I had this code that worked: a

[mochikit] Re: Disconnect All?

2006-03-27 Thread troels knak-nielsen
Very good idea - I remember looking for exactly that the other day.Useful for putting in the destructor/teardown of a controller-object (widget). For the sake of interoperability, I think it's better with a separate method, rather than extending the signature of disconnect. Better to stay close