[Moo] Re: Convert MooTools Classes to ES6 Classes

2014-01-11 Thread rasmusfl0e
Wow - imagine MooTools as a collection of transforms that turns into code that uses whatever libs are currently the norm/performs best! On Friday, January 10, 2014 7:13:24 PM UTC+1, Christoph Pojer wrote: > > Hey, > > since ECMAScript 6 (the next version of JavaScript) is going to have > classes

Re: [Moo] Re: Now that Joomla (3.0) has almost given up on Mootools, what will become of it ?

2013-03-17 Thread rasmusfl0e
None of the popular CMS's have learned their lesson; not to have tight couplings between their framework and a third party library. Joomla got into trouble having chosen MooTools - and is now doing the same mistake with jQuery; they are solving the wrong problem. History _will_ repeat itself..

[Moo] Javascript Jabber podcast with Valerio and Arian is up

2013-03-01 Thread rasmusfl0e
Good to see (hear?) MooTools getting some publicity :D http://javascriptjabber.com/049-jsj-mootools-with-valerio-proietti-and-arian-stolwijk/ -- --- You received this message because you are subscribed to the Google Groups "MooTools Users" group. To unsubscribe from this group and stop receiv

[Moo] Re: binding? and access problem

2013-02-25 Thread rasmusfl0e
Well, by principal I'm refraining from writing actual working code for you. I want you to write your town code and learn that way. There's one big oversight in your script that I've noticed just now; your IIFE is just a FE - It never gets Immediately Instantiated. You've got: var Player =

[Moo] Re: binding? and access problem

2013-02-24 Thread rasmusfl0e
That is incorrect... po.Player does not exist and therefore the code fails at that point. po.remove doesn't exist either - which would also make the code fail (just like po.Player) - but the code never gets to this part because of the missing po.Player. But po.setStage on the other hand DOES ex

[Moo] Re: binding? and access problem

2013-02-23 Thread rasmusfl0e
remove methods. (I don't really know what you want with the Player method - so I'll ignore that :D ) You need to add the remove method to the Player.prototype to expose it. On Saturday, February 23, 2013 9:21:00 AM UTC+1, Hamburger wrote: > > thx rasmusfl0e, > I understand your h

[Moo] Re: binding? and access problem

2013-02-22 Thread rasmusfl0e
Bind returns a new function which means that a function and a bound version of that same function isnt the same: function foo () {} var bar = {}; var boundFoo = foo.bind(bar); console.log(foo === boundFoo); // false This means in order to add and remove bound functions on ev

[Moo] Re: How to select dynamically created elements ?

2012-12-12 Thread rasmusfl0e
np :) On Wednesday, December 12, 2012 3:22:09 AM UTC+1, Mushr00m wrote: > > Thanks guys for the help ! > @Sanford Whiteman = I now that a jsFiddle is always a good help for > understanding the subject but in my case it's a bit to complex to recreate > it outside my project

[Moo] Re: How to select dynamically created elements ?

2012-12-11 Thread rasmusfl0e
I'm guessing the code you've shown is run on domready or on load? Your routine is only going to do stuff to divs that are actually present at that particular time. No divs - no setup. So what you need to do is run the setup function on the divs as you add them. On Tuesday, December 11, 2012 5

[Moo] Re: iframe reference to itself (help please)

2012-11-15 Thread rasmusfl0e
You've only loaded MooTools in the iframe which means only the natives (Element, String, Array etc) in the iframe are extended with MT goodness - while they aren't in the outer frame. On Thursday, November 15, 2012 4:33:47 PM UTC+1, hartum wrote: > > Hi Again, I foun in jQuery is so simple to

[Moo] Re: CascadiaJS

2012-11-12 Thread rasmusfl0e
Wooot! :) Sadly I missed your talk streaming online *damn* - though I did see some guy named "Emily Rose"(?) give a talk on realtime hardware. Crazy stuff. On Monday, November 12, 2012 6:35:43 AM UTC+1, jdalton wrote: > > Just wanted to let you all know MooTools got some love at CascadiaJS. > I

[Moo] Re: this.myMethod() and this.setOptions() are not working!

2012-09-13 Thread rasmusfl0e
You're missing a bind on the each loop in the slide method: this.headings.each( function(heading, i, el) { // yada yada }.bind(this)); On Thursday, September 13, 2012 12:09:07 AM UTC+2, Douglas Machado wrote: > > @rasmusfl0e, > > Thanks for your reply, however it did not

[Moo] Re: this.myMethod() and this.setOptions() are not working!

2012-09-12 Thread rasmusfl0e
If you use the this keyword in events you'll most likely need to bind thisto the event function - like so: heading.addEvent('click', function(){ // yada yada this.hideAll(i); // yada yada }.bind(this)); It's basically also what's giving you that TypeError when you try to fire Slider.initi

[Moo] Re: Still exist a moo-port of jquery-Arctext.js ?

2012-07-13 Thread rasmusfl0e
Yeah - it's basically a question of using the var keyword ;) The dt*** vars need to be available for all the functions declared inside your IIFE - and the rest just need to be declared inside their respective encolsing functions. And then there's Element::store; it only recieves a key and a val

[Moo] Re: issue accessing cells in multi dimensional array

2012-02-28 Thread rasmusfl0e
Hmmm, maybe I'm missing something - but sometimes your for-loops run to 8 and sometimes to 7... is that on purpose. It would explain "index out of range" type errors. also you can make everything easier on yourself by letting your php script return some cleanr/meaner json: [ [5,4,4,4,4,4,4

[Moo] Very inspirational presentation

2012-02-14 Thread rasmusfl0e
Bret makes nice stuff with MooTools - some incredibly immediate and intuitive interfaces. http://vimeo.com/36579366

[Moo] Re: have mootools something like jQuery stopImmediatePropagation() ?

2011-11-07 Thread rasmusfl0e
stopPropagation perhaps? http://mootools.net/docs/core/Types/DOMEvent#DOMEvent:stopPropagation

[Moo] Flash finally obsolete

2011-07-29 Thread rasmusfl0e
Paul Irish linked up this on G+: http://www.ultranoir.com/en/#!/home/ Shows you don't need Flash anymore... you need MooTools :D The markup is terrible though (divs just replaced with section tags - lol) - but the site _is_ very flashy.

[Moo] Re: adding features to hasClass()

2011-02-20 Thread rasmusfl0e
h HTML. Or maybe they > do---I haven't tried it. But I wouldn't want to trust that without it > being tested.) > > G > > On Feb 19, 10:25 am, rasmusfl0e wrote: > > > Even faster:http://jsperf.com/moo-hasclass-alternative/4:D > > > On Feb 18, 5:48 pm, A

[Moo] Re: adding features to hasClass()

2011-02-19 Thread rasmusfl0e
Even faster: http://jsperf.com/moo-hasclass-alternative/4 :D On Feb 18, 5:48 pm, Arian Stolwijk wrote: > Even faster:http://jsperf.com/moo-hasclass-alternative/3 > > On Fri, Feb 18, 2011 at 4:37 PM, Ryan Florence wrote: > >http://jsperf.com/moo-hasclass-alternative > > > Yeah, it appears to be f

[Moo] Re: foo? XHTML support in MooTools

2011-02-18 Thread rasmusfl0e
15 am, Garret Wilson wrote: > On Feb 18, 7:38 pm, rasmusfl0e wrote: > > > You might get better results using an actual XHTML doctype... > > That is an actual XHTML doctype. > See:http://www.w3.org/TR/html5/syntax.html#the-doctype > > It's not a doctype of XHTML 1.0

[Moo] Re: foo? XHTML support in MooTools

2011-02-18 Thread rasmusfl0e
You might get better results using an actual XHTML doctype... There's no telling how browsers will react combining an xml declaration with an HTML5 doctype (HTML5!=xml). You might want to stay clear of using an xml declaration if what you're building is supposed to work in IE (no support for appli

[Moo] Re: Mootools.net down?

2010-11-17 Thread rasmusfl0e
AM, Sean McArthur wrote: > > > > > > > > > Nope. Just worked for me. > > > Sean McArthur > > > On Nov 17, 2010 8:21 AM, "rasmusfl0e" wrote: > > > Anyone else having trouble accessing mootools.net?

[Moo] Mootools.net down?

2010-11-17 Thread rasmusfl0e
Anyone else having trouble accessing mootools.net?

[Moo] Re: Levenshtein distance

2010-10-06 Thread rasmusfl0e
lol :D If you begin to type "mootools" it will suggest "dojo" all the way up until get to the third "o"; "mooto" :P But nice job anyway On Oct 6, 12:37 pm, Adrian Statescu wrote: > A String.method which calculates Levenshtein distance between two > strings. > Check this out on forge:http://moot

[Moo] Re: Issue with Cmorph function in mootools canvas library

2010-10-04 Thread rasmusfl0e
I think your problem might not be with Canvas Library (which I've never heard of before now) - but more with the fact that you store coordinates in a string(?). At one point you're doing this: positionCoordinates[grid_id] = x_cord + "," + y_cord; // let's say "50,75" and later you do this:

[Moo] Mootools More not utf-8 downloaded from the builder?

2010-09-16 Thread rasmusfl0e
Am I the only one who gets a non-utf-8 encoded txt-file when downloading More? Non-ascii characters get botched - e.g æ, ø and å in Date.Danish :( I'm assuming that the More source on github is utf-8.

[Moo] Re: I started a simple blog.

2010-05-31 Thread rasmusfl0e
How would you get ""/"odd" back as even/odd using that one liner? "" || "even" would return "even" On May 31, 2:56 pm, Michael Ficarra wrote: > A slightly faster one-liner:http://jsfiddle.net/Jm2Hb/9/ > > Use &1 to check the last bit. It's faster than modding, especially for > larger numbers. >

[Moo] Re: IE8 Opacity Animation Bug, child node position relative

2010-03-28 Thread rasmusfl0e
I missed the part about the children having non-default positioning :( But anywho - css can still be used to cure the problem; this shell uses display inline-block http://jsfiddle.net/r3Lg5/ (which may or may not be appropriate in reallife). The links to hasLayout info was intended for anyone not

[Moo] Re: IE8 Opacity Animation Bug, child node position relative

2010-03-28 Thread rasmusfl0e
"hasLayout" can be triggered through css - no need to "polute" the html with unnecessary attributes. :P You can use a number of different approaches via css; setting a width or height, floating an element... the list goes on. My favourite would be using the MS proprietary "zoom" (only IE reads it):

[Moo] Re: Cookie behaves different when URL ends with slash or not

2010-03-10 Thread rasmusfl0e
The MooTools docs state: * In order to share the Cookie with pages located in a different path, the Cookie.options.domain value must be set. Read The Friendly Manual :P On Mar 10, 1:21 pm, woomla wrote: > If I have a cookie in a subdirectory, this cookie is read from even > when I'm in the roo

[Moo] Re: remove CSS all classes from element except one

2010-02-24 Thread rasmusfl0e
The way you've used RegExp will also match partial matches; you look for "rump" and get a match on "scrump"... not good. False positives. @Yann: The contains method you listed is the Array method - not String one which looks like this: contains: function(string, separator){ return (separa

[Moo] Re: remove CSS all classes from element except one

2010-02-23 Thread rasmusfl0e
Avoid unnecessary function calls. The following uses only 1 extra call to hasClass: Element.implement({ removeAllClassExcept: function(klass) { this.className = this.hasClass(klass) ? klass : ''; return this; } }); Performance is better ("time4"): http://mootools.net/shel

[Moo] Re: remove CSS all classes from element except one

2010-02-23 Thread rasmusfl0e
dude - would you like to borrow the "var" keyword? :P anyways... if you want performance avoid extra function calls when they aren't needed. all of the above could be done much simpler - the following example uses only 1 hasClass call: Element.implement({ removeAllClassExcept: function(klass)

[Moo] Re: IE7 problem: Object doesn't support this property or method

2010-02-22 Thread rasmusfl0e
..or just use Window.getWidth() (notice uppercase W). On Feb 23, 2:20 am, Anatol wrote: > Hi, > > I added a few simple Mootools effects to a web page. All works well in > Firefox, but (as expected) IE (tested in IE7) causes trouble for some > but not all of the script. > > Here is a test page:htt

[Moo] Re: Mooshell is using Mootools 1.2.4

2009-10-20 Thread rasmusfl0e
It just keeps getting better and better - also luvin the new design (oskar's?) On Oct 20, 1:27 pm, Piotr Zalewa wrote: > 2009/10/20 Aaron Newton > > > Agreed, good stuff.http://mooshell.net/TZdp7/show<< no worky > > Usehttp://mooshell.net/TZdp7/show/forgotten about the slash on the end - > sorr

[Moo] Re: DOM refresh in IE6

2009-07-16 Thread rasmusfl0e
So you're setting up javascript interaction with 300+ divs? That's a lot of wasted cpu cycles; the user will most likely only interact with 30 of those divs (this is a mere guess). Maybe "event delegation" would be a way to go? - only setting up js for the html as the user interacts with a specif

[Moo] Re: json object / second level of arrays

2009-06-27 Thread rasmusfl0e
"loan" is an object - you can't just concatenate it directly onto a string. You need to pick out each piece of data from the loan object you want to present: var el = new Element('li', {'html': ''+ item.id+' '+ item.loan.name + ": " + item.loan.loan_amount}).inject(liste);

[Moo] Re: Object garbage collection?

2009-05-05 Thread rasmusfl0e
Sounds like you need to seperate logic and content - event delegation would be a way to go. Keep keyboard navigation out of the DataBlock classes. On May 5, 7:18 pm, rpflo wrote: > Not sure if that's even what I should title this message. > > So I've got a class called DataBlock that's got some

[Moo] Re: ~=, but what about !~=?

2009-05-04 Thread rasmusfl0e
$$("li:not('.myClass')") On May 4, 4:58 am, rpflo wrote: > I can do: > > $$('li:[class~=myClass]') and get the li's that have myClass within > the space seperated list. > > But what if I wanted to select the ones *without* a class, (or rel, or > name, or title) in a separated list? > > !~=  woul

[Moo] Re: Drag.Move() slow for images

2009-04-28 Thread rasmusfl0e
I'm guessing the browser has to move the image AND scale it at the same - and this causes the hicups. Why even scale the image when you're already scrolling around to view it? On Apr 29, 12:38 am, TheIvIaxx wrote: > ok so i jumped the gun on ie being faster :) > > if the image is not scaled at

[Moo] Re: IE 7 v1.2 Array [] incompatibility badly need help

2009-03-31 Thread rasmusfl0e
The incompatbility lies in nature of mootools; extending javascript. This in turn exposes bad coding practices like using for (var ... in ...) structures without doing hasOwnProprty filtering - especially on Arrays. My guess is that this is what's throwing off IE7. for (var t in taxes) lo

Re: Mootools link nudging? - NOT WORKING!!

2009-02-07 Thread rasmusfl0e
the code you're trying to shoehorn into a mootools context is jquery code... just copy/pasting code randomly won't get you far. please take look at the blog post nwhite wrote - what you need is all there. On Feb 8, 3:09 am, "Erik R. Peterson" wrote: > Has anyone successfully installed the lin

Re: Mootools link nudging? - NOT WORKING!!

2009-02-07 Thread rasmusfl0e
looks like you copied the jquery sample code and not the mootools sample just below it. On Feb 8, 3:09 am, "Erik R. Peterson" wrote: > Has anyone successfully installed the link nudge? > > Erik > > On Feb 7, 2009, at 8:58 PM, Erik R. Peterson wrote: > > > > > I'm using mootools. > > > I removed:

Re: Color Class suggestion.

2009-01-10 Thread rasmusfl0e
and as a side note - picking a random color would very easy: Var myRandomColor = new Color($random(0, 0xFF)); ;) On Jan 9, 10:15 pm, Sam wrote: > function num2rgb(num) > { >   var r = (num >> 16) & 0xFF; >   var g = (num >> 8) & 0xFF; >   var b = num & 0xFF; > >   return [r,g,b]; > > }

Re: Does Request.HTML w/ update kill Events?

2008-12-13 Thread rasmusfl0e
whatever DOM elements you replace you will also loose their respective events. it doesn't matter whether they are replaced by elements matching their tag, id and class. either you re-apply the needed events to the new elements or you use event delegation on a static parent element (an element tha

Re: 2 new Class.Mutators!

2008-10-12 Thread rasmusfl0e
it's very hackable: Secret.implement({ set: function(message){ secret = message; } }); msg.set("hello, world"); msg.get(); // returns "hello, world" On Oct 10, 10:47 pm, "Nathan White" <[EMAIL PROTECTED]> wrote: > ok. I have made two updates to my Privates Mutator. > > Now if you

Re: Table rows toggle display style problem

2008-10-07 Thread rasmusfl0e
the combination should be something like: display: table-cell / display: none On Oct 7, 11:37 pm, tr0y <[EMAIL PROTECTED]> wrote: > I'm having a problem where the table cells collapse and get all wonky > on a key event.  Clearly I am doing something, but I can't seem to > track down what it is.  

Re: To the core!

2008-10-06 Thread rasmusfl0e
*takes Jon's keys out of his hands and whistles for a cab* On Oct 6, 9:21 pm, Jon Hack <[EMAIL PROTECTED]> wrote: > I just want to raise my glass to MooTools core developer team. You > guys have done some most excellent work with this framework and I am > very grateful for what you have provided

Re: IE Drag bug: if opacity=0, you can't grab the Drag obj

2008-09-16 Thread rasmusfl0e
while an opacity of 0 will make a div unclickable in IE - a div with a transparent gif as background will go figure :/ why not just have the image be draggable inside a div with overflow hidden? On Sep 16, 11:17 pm, kfancy <[EMAIL PROTECTED]> wrote: > Hi Nathan, > > Yes, that may seem like c

Re: acces to the JSON object

2008-09-10 Thread rasmusfl0e
the first argument in your onSuccess IS the json object. which means you could do this: onSuccess: function(json){ alert(json.Zone); // should alert "Hekla" alert(json.Gemeente); // should alert "Hove" it couldn't be any easier! ;) On Sep 10, 12:07 pm, Janec <[EM